pupil 0.6 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +3 -0
- data/CHANGELOG.md +5 -0
- data/lib/pupil/essentials.rb +2 -2
- data/lib/pupil/friendships.rb +1 -0
- data/lib/pupil/version.rb +1 -1
- data/pupil.gemspec +1 -0
- data/spec/pupil_spec.rb +5 -3
- metadata +30 -12
data/.travis.yml
ADDED
data/CHANGELOG.md
CHANGED
data/lib/pupil/essentials.rb
CHANGED
@@ -50,7 +50,7 @@ class Pupil
|
|
50
50
|
raise NetworkError, vars
|
51
51
|
end
|
52
52
|
result = JSON.parse(response)
|
53
|
-
return (result["
|
53
|
+
return (result["errors"].nil? rescue true)? result : false
|
54
54
|
end
|
55
55
|
|
56
56
|
def post(url, param={})
|
@@ -61,7 +61,7 @@ class Pupil
|
|
61
61
|
raise NetworkError, vars
|
62
62
|
end
|
63
63
|
result = JSON.parse(response)
|
64
|
-
return (result["
|
64
|
+
return (result["errors"].nil? rescue true)? result : false
|
65
65
|
end
|
66
66
|
end
|
67
67
|
end
|
data/lib/pupil/friendships.rb
CHANGED
data/lib/pupil/version.rb
CHANGED
data/pupil.gemspec
CHANGED
@@ -16,6 +16,7 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.version = Pupil::VERSION
|
17
17
|
gem.add_dependency "oauth"
|
18
18
|
gem.add_dependency "json"
|
19
|
+
gem.add_development_dependency "rake"
|
19
20
|
gem.add_development_dependency "rspec"
|
20
21
|
gem.add_development_dependency "yard"
|
21
22
|
gem.add_development_dependency "bundler"
|
data/spec/pupil_spec.rb
CHANGED
@@ -4,6 +4,8 @@
|
|
4
4
|
# pupil_spec require PUPIL_TESTKEY in spec_testkey.rb
|
5
5
|
# You should create file spec_testkey.rb into /spec to define PUPIL_TESTKEY with Pupil key.
|
6
6
|
|
7
|
+
require "pp"
|
8
|
+
|
7
9
|
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
8
10
|
|
9
11
|
describe Pupil, "が #verify_credentials を呼ぶ時は" do
|
@@ -35,15 +37,15 @@ end
|
|
35
37
|
describe Pupil, "が #mentions を呼ぶ時は" do
|
36
38
|
before do
|
37
39
|
pupil = Pupil.new PUPIL_TESTKEY
|
38
|
-
@mentions = pupil.mentions :count =>
|
40
|
+
@mentions = pupil.mentions :count => 1
|
39
41
|
end
|
40
42
|
|
41
43
|
it "Array型を返すこと" do
|
42
44
|
@mentions.class.should == Array
|
43
45
|
end
|
44
46
|
|
45
|
-
it "sizeが
|
46
|
-
@mentions.size.should ==
|
47
|
+
it "sizeが1であること" do
|
48
|
+
@mentions.size.should == 1
|
47
49
|
end
|
48
50
|
end
|
49
51
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pupil
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.6.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-08-03 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: oauth
|
16
|
-
requirement: &
|
16
|
+
requirement: &70097868260460 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70097868260460
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: json
|
27
|
-
requirement: &
|
27
|
+
requirement: &70097868259880 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,21 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70097868259880
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rake
|
38
|
+
requirement: &70097868259300 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :development
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70097868259300
|
36
47
|
- !ruby/object:Gem::Dependency
|
37
48
|
name: rspec
|
38
|
-
requirement: &
|
49
|
+
requirement: &70097868258700 !ruby/object:Gem::Requirement
|
39
50
|
none: false
|
40
51
|
requirements:
|
41
52
|
- - ! '>='
|
@@ -43,10 +54,10 @@ dependencies:
|
|
43
54
|
version: '0'
|
44
55
|
type: :development
|
45
56
|
prerelease: false
|
46
|
-
version_requirements: *
|
57
|
+
version_requirements: *70097868258700
|
47
58
|
- !ruby/object:Gem::Dependency
|
48
59
|
name: yard
|
49
|
-
requirement: &
|
60
|
+
requirement: &70097868258280 !ruby/object:Gem::Requirement
|
50
61
|
none: false
|
51
62
|
requirements:
|
52
63
|
- - ! '>='
|
@@ -54,10 +65,10 @@ dependencies:
|
|
54
65
|
version: '0'
|
55
66
|
type: :development
|
56
67
|
prerelease: false
|
57
|
-
version_requirements: *
|
68
|
+
version_requirements: *70097868258280
|
58
69
|
- !ruby/object:Gem::Dependency
|
59
70
|
name: bundler
|
60
|
-
requirement: &
|
71
|
+
requirement: &70097868257780 !ruby/object:Gem::Requirement
|
61
72
|
none: false
|
62
73
|
requirements:
|
63
74
|
- - ! '>='
|
@@ -65,7 +76,7 @@ dependencies:
|
|
65
76
|
version: '0'
|
66
77
|
type: :development
|
67
78
|
prerelease: false
|
68
|
-
version_requirements: *
|
79
|
+
version_requirements: *70097868257780
|
69
80
|
description: The "Lazy" Twitter API Library for Ruby 1.9.x. Easy to use.
|
70
81
|
email:
|
71
82
|
- oame@oameya.com
|
@@ -75,6 +86,7 @@ extensions: []
|
|
75
86
|
extra_rdoc_files: []
|
76
87
|
files:
|
77
88
|
- .gitignore
|
89
|
+
- .travis.yml
|
78
90
|
- CHANGELOG.md
|
79
91
|
- Gemfile
|
80
92
|
- Gemfile.lock
|
@@ -119,12 +131,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
119
131
|
- - ! '>='
|
120
132
|
- !ruby/object:Gem::Version
|
121
133
|
version: '0'
|
134
|
+
segments:
|
135
|
+
- 0
|
136
|
+
hash: -1341416482152180508
|
122
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
123
138
|
none: false
|
124
139
|
requirements:
|
125
140
|
- - ! '>='
|
126
141
|
- !ruby/object:Gem::Version
|
127
142
|
version: '0'
|
143
|
+
segments:
|
144
|
+
- 0
|
145
|
+
hash: -1341416482152180508
|
128
146
|
requirements: []
|
129
147
|
rubyforge_project:
|
130
148
|
rubygems_version: 1.8.10
|