north_pole_wrapper 0.2.0 → 0.2.3

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.
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- coderay (1.0.8)
4
+ coderay (1.0.9)
5
5
  diff-lcs (1.1.3)
6
- ffi (1.3.1)
6
+ ffi (1.4.0)
7
7
  git (1.2.5)
8
8
  guard (1.6.2)
9
9
  listen (>= 0.6.0)
@@ -11,7 +11,7 @@ GEM
11
11
  pry (>= 0.9.10)
12
12
  terminal-table (>= 1.4.3)
13
13
  thor (>= 0.14.6)
14
- guard-rspec (2.4.0)
14
+ guard-rspec (2.4.1)
15
15
  guard (>= 1.1)
16
16
  rspec (~> 2.11)
17
17
  httparty (0.10.2)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.3
@@ -1,4 +1,3 @@
1
-
2
1
  require 'httparty'
3
2
  require 'pry'
4
3
  require 'json'
@@ -8,8 +7,8 @@ module NorthPoleWrapper
8
7
  binding.pry
9
8
  end
10
9
 
11
- USER = 'guest@northpole.ro'
12
- APIKEY = 'guest'
10
+ API_KEY = 'guest@northpole.ro'
11
+ SECRET = 'guest'
13
12
 
14
13
  class Resource
15
14
  include HTTParty
@@ -0,0 +1,71 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "north_pole_wrapper"
8
+ s.version = "0.2.3"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Cristian Messel"]
12
+ s.date = "2013-02-23"
13
+ s.description = "wrapper for northpole.ro api"
14
+ s.email = "mess110@gmail.com"
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".rspec",
22
+ ".rvmrc",
23
+ "Gemfile",
24
+ "Gemfile.lock",
25
+ "Guardfile",
26
+ "LICENSE.txt",
27
+ "README.rdoc",
28
+ "Rakefile",
29
+ "VERSION",
30
+ "lib/north_pole_wrapper.rb",
31
+ "north_pole_wrapper.gemspec",
32
+ "spec/north_pole_wrapper_spec.rb",
33
+ "spec/spec_helper.rb"
34
+ ]
35
+ s.homepage = "http://bitbucket.org/mess110/north_pole_wrapper"
36
+ s.licenses = ["MIT"]
37
+ s.require_paths = ["lib"]
38
+ s.rubygems_version = "1.8.24"
39
+ s.summary = "wrapper for northpole.ro api"
40
+
41
+ if s.respond_to? :specification_version then
42
+ s.specification_version = 3
43
+
44
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
45
+ s.add_runtime_dependency(%q<httparty>, [">= 0"])
46
+ s.add_runtime_dependency(%q<pry>, [">= 0"])
47
+ s.add_development_dependency(%q<rspec>, [">= 0"])
48
+ s.add_development_dependency(%q<guard-rspec>, [">= 0"])
49
+ s.add_development_dependency(%q<rb-inotify>, ["~> 0.8.8"])
50
+ s.add_development_dependency(%q<bundler>, [">= 0"])
51
+ s.add_development_dependency(%q<jeweler>, [">= 0"])
52
+ else
53
+ s.add_dependency(%q<httparty>, [">= 0"])
54
+ s.add_dependency(%q<pry>, [">= 0"])
55
+ s.add_dependency(%q<rspec>, [">= 0"])
56
+ s.add_dependency(%q<guard-rspec>, [">= 0"])
57
+ s.add_dependency(%q<rb-inotify>, ["~> 0.8.8"])
58
+ s.add_dependency(%q<bundler>, [">= 0"])
59
+ s.add_dependency(%q<jeweler>, [">= 0"])
60
+ end
61
+ else
62
+ s.add_dependency(%q<httparty>, [">= 0"])
63
+ s.add_dependency(%q<pry>, [">= 0"])
64
+ s.add_dependency(%q<rspec>, [">= 0"])
65
+ s.add_dependency(%q<guard-rspec>, [">= 0"])
66
+ s.add_dependency(%q<rb-inotify>, ["~> 0.8.8"])
67
+ s.add_dependency(%q<bundler>, [">= 0"])
68
+ s.add_dependency(%q<jeweler>, [">= 0"])
69
+ end
70
+ end
71
+
@@ -4,7 +4,7 @@ include NorthPoleWrapper
4
4
 
5
5
  describe NorthPoleWrapper do
6
6
  it "shold work" do
7
- USER.should == 'guest@northpole.ro'
7
+ API_KEY.should == 'guest@northpole.ro'
8
8
 
9
9
  User.klass.should == 'user'
10
10
 
@@ -24,19 +24,19 @@ describe NorthPoleWrapper do
24
24
  end
25
25
 
26
26
  it "should create" do
27
- body = Storage.create('mail' => USER, 'apikey' => APIKEY,
27
+ body = Storage.create('api_key' => API_KEY, 'secret' => SECRET,
28
28
  'foo' => 'bar').body
29
29
  body.class.should == String
30
30
  json = JSON.parse(body)
31
31
  end
32
32
 
33
33
  it "should find" do
34
- body = Storage.create('mail' => USER, 'apikey' => APIKEY,
34
+ body = Storage.create('api_key' => API_KEY, 'secret' => SECRET,
35
35
  'foo' => 'bar').body
36
36
  body.class.should == String
37
37
  json = JSON.parse(body)
38
38
 
39
- body2 = Storage.find('mail' => USER, 'apikey' => APIKEY,
39
+ body2 = Storage.find('api_key' => API_KEY, 'secret' => SECRET,
40
40
  '_id' => json['_id']).body
41
41
  json2 = JSON.parse(body2)
42
42
  json2.count.should > 0
@@ -44,18 +44,18 @@ describe NorthPoleWrapper do
44
44
  end
45
45
 
46
46
  it "should update" do
47
- body = Storage.create('mail' => USER, 'apikey' => APIKEY,
47
+ body = Storage.create('api_key' => API_KEY, 'secret' => SECRET,
48
48
  'foo' => 'bar').body
49
49
  body.class.should == String
50
50
  json = JSON.parse(body)
51
51
 
52
- body2 = Storage.update('mail' => USER, 'apikey' => APIKEY,
52
+ body2 = Storage.update('api_key' => API_KEY, 'secret' => SECRET,
53
53
  '_id' => json['_id'], 'foo' => 'haha').body
54
54
  json2 = JSON.parse(body2)
55
55
  json2['_id'].should == json['_id']
56
56
 
57
57
 
58
- body3 = Storage.find('mail' => USER, 'apikey' => APIKEY,
58
+ body3 = Storage.find('api_key' => API_KEY, 'secret' => SECRET,
59
59
  '_id' => json['_id']).body
60
60
  json3 = JSON.parse(body3)
61
61
  json3.count.should > 0
@@ -63,15 +63,15 @@ describe NorthPoleWrapper do
63
63
  end
64
64
 
65
65
  it "should delete" do
66
- body = Storage.create('mail' => USER, 'apikey' => APIKEY,
66
+ body = Storage.create('api_key' => API_KEY, 'secret' => SECRET,
67
67
  'foo' => 'bar').body
68
68
  body.class.should == String
69
69
  json = JSON.parse(body)
70
70
 
71
- Storage.destroy('mail' => USER, 'apikey' => APIKEY,
71
+ Storage.destroy('api_key' => API_KEY, 'secret' => SECRET,
72
72
  '_id' => json['_id'])
73
73
 
74
- body2 = Storage.find('mail' => USER, 'apikey' => APIKEY,
74
+ body2 = Storage.find('api_key' => API_KEY, 'secret' => SECRET,
75
75
  '_id' => json['_id']).body
76
76
  json2 = JSON.parse(body2)
77
77
  json2.count.should == 0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: north_pole_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-19 00:00:00.000000000 Z
12
+ date: 2013-02-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -142,6 +142,7 @@ files:
142
142
  - Rakefile
143
143
  - VERSION
144
144
  - lib/north_pole_wrapper.rb
145
+ - north_pole_wrapper.gemspec
145
146
  - spec/north_pole_wrapper_spec.rb
146
147
  - spec/spec_helper.rb
147
148
  homepage: http://bitbucket.org/mess110/north_pole_wrapper
@@ -159,7 +160,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
159
160
  version: '0'
160
161
  segments:
161
162
  - 0
162
- hash: 1369800214602460510
163
+ hash: 3399874976312393624
163
164
  required_rubygems_version: !ruby/object:Gem::Requirement
164
165
  none: false
165
166
  requirements: