qiita 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.rspec +2 -0
- data/Rakefile +4 -0
- data/lib/qiita/client/users.rb +11 -2
- data/lib/qiita/version.rb +1 -1
- data/qiita.gemspec +2 -0
- data/spec/qiita_spec.rb +18 -0
- data/spec/spec_helper.rb +5 -0
- metadata +24 -3
data/.rspec
ADDED
data/Rakefile
CHANGED
data/lib/qiita/client/users.rb
CHANGED
@@ -6,13 +6,22 @@ module Qiita
|
|
6
6
|
get path, params
|
7
7
|
end
|
8
8
|
|
9
|
+
def user_following_tags(url_name, params={})
|
10
|
+
get "/users/#{url_name}/following_tags", params
|
11
|
+
end
|
12
|
+
|
13
|
+
def user_following_users(url_name, params={})
|
14
|
+
get "/users/#{url_name}/following_users", params
|
15
|
+
end
|
16
|
+
|
9
17
|
def user_stocks(url_name=nil, params={})
|
10
18
|
path = url_name ? "/users/#{url_name}/stocks" : '/stocks'
|
11
19
|
get path, params
|
12
20
|
end
|
13
21
|
|
14
|
-
def user(url_name)
|
15
|
-
|
22
|
+
def user(url_name=nil)
|
23
|
+
path = url_name ? "/users/#{url_name}" : '/user'
|
24
|
+
get path
|
16
25
|
end
|
17
26
|
end
|
18
27
|
end
|
data/lib/qiita/version.rb
CHANGED
data/qiita.gemspec
CHANGED
data/spec/qiita_spec.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Qiita do
|
4
|
+
it { should respond_to(:new) }
|
5
|
+
|
6
|
+
describe 'new' do
|
7
|
+
it 'returns Qiita::Client instance' do
|
8
|
+
subject.new.should be_a_kind_of(Qiita::Client)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
describe 'method_missing' do
|
13
|
+
it 'delegates method to Qiita::Client instance' do
|
14
|
+
Qiita::Client.any_instance.should_receive(:rate_limit)
|
15
|
+
subject.rate_limit
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qiita
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.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: 2012-10-
|
12
|
+
date: 2012-10-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -75,6 +75,22 @@ dependencies:
|
|
75
75
|
- - ~>
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '1.2'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: rspec
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
78
94
|
description: ! " Gets some tag's or user's items at qiita.com.\n Creates, updates,
|
79
95
|
deletes and stocks items at Qiita.\n"
|
80
96
|
email:
|
@@ -84,6 +100,7 @@ extensions: []
|
|
84
100
|
extra_rdoc_files: []
|
85
101
|
files:
|
86
102
|
- .gitignore
|
103
|
+
- .rspec
|
87
104
|
- Gemfile
|
88
105
|
- LICENSE.txt
|
89
106
|
- README.md
|
@@ -97,6 +114,8 @@ files:
|
|
97
114
|
- lib/qiita/error.rb
|
98
115
|
- lib/qiita/version.rb
|
99
116
|
- qiita.gemspec
|
117
|
+
- spec/qiita_spec.rb
|
118
|
+
- spec/spec_helper.rb
|
100
119
|
homepage: http://github.com/yaotti/qiita-rb
|
101
120
|
licenses: []
|
102
121
|
post_install_message:
|
@@ -121,5 +140,7 @@ rubygems_version: 1.8.23
|
|
121
140
|
signing_key:
|
122
141
|
specification_version: 3
|
123
142
|
summary: Ruby wrapper for Qiita API v1.
|
124
|
-
test_files:
|
143
|
+
test_files:
|
144
|
+
- spec/qiita_spec.rb
|
145
|
+
- spec/spec_helper.rb
|
125
146
|
has_rdoc:
|