Class: Note

Inherits:
ActiveResource::Base
  • Object
show all
Defined in:
lib/note.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.configObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/note.rb', line 10

def self.config
  @@config = yaml
  scheme =  if !!@@config['ssl']
              self.ssl_options = {  :verify_mode => OpenSSL::SSL::VERIFY_PEER,
                                    :ca_file => File.join(File.dirname(__FILE__), "cacert.pem") }
              "https"
            else
              "http"
            end
  host = @@config['host'] || "www.projectnotifier.com"
  self.site = "#{scheme}://#{host}/accounts/#{@@config['account']}/projects/#{@@config['project']}"
  self.user = @@config["token"]
  Note.format = :json
  @@config
end

.yamlObject



6
7
8
# File 'lib/note.rb', line 6

def self.yaml
  YAML.load_file('slurper_config.yml')
end

Instance Method Details

#prepareObject



27
28
29
30
# File 'lib/note.rb', line 27

def prepare
  scrub_description
  default_tags
end