bolzter 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NjhhNjQzYWM4MTYyMTQ0NzA1Y2M5M2NiYTkzYWJlMGUxNTdiNmIzMg==
5
+ data.tar.gz: !binary |-
6
+ NTY0ODA4NTUzOWM5YjcxYzg1NWRkNDM0M2Y3YTYxNjI0ODM0NDdmMw==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ MTlkOWEwOGM0YmEyMGVmMzQxOWE5ZTdmZGY3MTIxOGYzMWY2ZjY3MDhjNWJl
10
+ OTZlNmQyOTMwZWVhODAxYmQwMTdiNDExNzk1MjczNTc3NjcxZDI5OWQ2MTg0
11
+ ZmY2N2NlNTM3OGM5Nzg1YmI5ZWQyZDAxNWEzYzZjNDVlMGZlMzg=
12
+ data.tar.gz: !binary |-
13
+ YWZiOThhYzc4MWM1ODM3YzE2NzY5MDA4YjEzNTNmZWJmNmZhNzY4YjA0ZDRm
14
+ Nzc5ZTBiNmMzYmFhNGY4OTJhM2ZhODZjNDg3NWJiMTQ3ZDQyY2Q2OTQ4Y2Rl
15
+ NjhkY2NmYzE3ZmIxMTU1M2VjZGFkYjY4Yjg1NjMzZTdjZWJmMTM=
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/bolzter-0.0.1.gem ADDED
Binary file
data/bolzter.gemspec CHANGED
@@ -8,12 +8,12 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Bolzter::VERSION
9
9
  spec.authors = ["John"]
10
10
  spec.email = ["rails.john.smith@gmail.com"]
11
- spec.summary = "Interface to Bolzter APIs"
11
+ spec.summary = "This gem supports an interface to Bolzter APIs"
12
12
  spec.description = "This gem supports an interface to Bolzter APIs"
13
13
  spec.homepage = ""
14
14
  spec.license = "MIT"
15
15
 
16
- spec.files = ["Gemfile", "LICENSE.txt", "README.md", "Rakefile", "bolzter.gemspec", "lib/bolzter.rb", "lib/bolzter/version.rb"]
16
+ spec.files = `git ls-files -z`.split("\x0")
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
@@ -1,3 +1,3 @@
1
1
  module Bolzter
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
data/lib/bolzter.rb CHANGED
@@ -13,21 +13,22 @@ module Bolzter
13
13
  @@end_point = "user"
14
14
 
15
15
  # => Set credential. It should be called before call APIs.
16
- def self.set_credentials(username, api_key)
17
- @@username = username
18
- @@api_key = api_key
19
- {:username => username, :api_key => api_key}
20
- end
21
-
22
- def self.set_credentials
23
- conf_file = File.join(Rails.root, 'config', 'bolzter.yml').to_s
24
- if File.exists?(conf_file)
25
- config = YAML.load_file(conf_file)
26
- @@username = config["username"]
27
- @@api_key = config["api_key"]
16
+ def self.set_credentials(*args)
17
+ if args.length < 2
18
+ conf_file = File.join(Rails.root, 'config', 'bolzter.yml').to_s
19
+ if File.exists?(conf_file)
20
+ config = YAML.load_file(conf_file)
21
+ self.set_credentials(config["username"], config["api_key"])
22
+ else
23
+ puts "conf/bolzter.yml file does not exist. Please copy bolzter.yml.example file."
24
+ end
25
+ elsif args.length == 2
26
+ @@username = args[0]
27
+ @@api_key = args[1]
28
28
  {:username => @@username, :api_key => @@api_key}
29
29
  else
30
- puts "conf/bolzter.yml file does not exist. Please copy bolzter.yml.example file."
30
+ # To do:
31
+ puts "Invalid parameters."
31
32
  end
32
33
  end
33
34
 
metadata CHANGED
@@ -1,38 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bolzter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
5
- prerelease:
4
+ version: 0.0.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - John
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-12-15 00:00:00.000000000 Z
11
+ date: 2014-12-17 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
- requirement: &19675560 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
19
  version: '1.7'
22
20
  type: :development
23
21
  prerelease: false
24
- version_requirements: *19675560
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: rake
27
- requirement: &19260820 !ruby/object:Gem::Requirement
28
- none: false
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
31
  - - ~>
31
32
  - !ruby/object:Gem::Version
32
33
  version: '10.0'
33
34
  type: :development
34
35
  prerelease: false
35
- version_requirements: *19260820
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
36
41
  description: This gem supports an interface to Bolzter APIs
37
42
  email:
38
43
  - rails.john.smith@gmail.com
@@ -40,36 +45,37 @@ executables: []
40
45
  extensions: []
41
46
  extra_rdoc_files: []
42
47
  files:
48
+ - .gitignore
43
49
  - Gemfile
44
50
  - LICENSE.txt
45
51
  - README.md
46
52
  - Rakefile
53
+ - bolzter-0.0.1.gem
47
54
  - bolzter.gemspec
48
55
  - lib/bolzter.rb
49
56
  - lib/bolzter/version.rb
50
57
  homepage: ''
51
58
  licenses:
52
59
  - MIT
60
+ metadata: {}
53
61
  post_install_message:
54
62
  rdoc_options: []
55
63
  require_paths:
56
64
  - lib
57
65
  required_ruby_version: !ruby/object:Gem::Requirement
58
- none: false
59
66
  requirements:
60
67
  - - ! '>='
61
68
  - !ruby/object:Gem::Version
62
69
  version: '0'
63
70
  required_rubygems_version: !ruby/object:Gem::Requirement
64
- none: false
65
71
  requirements:
66
72
  - - ! '>='
67
73
  - !ruby/object:Gem::Version
68
74
  version: '0'
69
75
  requirements: []
70
76
  rubyforge_project:
71
- rubygems_version: 1.8.11
77
+ rubygems_version: 2.4.5
72
78
  signing_key:
73
- specification_version: 3
74
- summary: Interface to Bolzter APIs
79
+ specification_version: 4
80
+ summary: This gem supports an interface to Bolzter APIs
75
81
  test_files: []