everlog 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cdeac73e0c2896ab2a4a419211ed244304801ac4
4
- data.tar.gz: e6e220f0d5a333b4e23089b1aebc8f6d4eb80b4d
3
+ metadata.gz: bef4a4a2e341c22404d420abbb5d765f4dae7e69
4
+ data.tar.gz: 3b0bcd5ee849a5b9fe309a4366a68647d3748dff
5
5
  SHA512:
6
- metadata.gz: 4ce875a255ece257cf37bb70a3fa2528c08f407cf6e0618283796b31ec20c73131952ec8a9852454b736d70784a34e4a8a8f2ae6252448de762592bec1f2db15
7
- data.tar.gz: 8f55770e57d40f4f2fc2dd4b5dc5a48b7323c32f1ec7c840aba5321569be23502ace4f0dbfc0735b9a2f8e8e65bdb56c7a88ed3d772d655f993563f1c01ecc79
6
+ metadata.gz: 6af15009cdc4b8f176dec0d11ba9d87aa5c39e3ce174cc9dbbef173f74be308611413908f293e71c9558a497baeb43b208dfe26e2a91ecd35c3d7fbc2bec2cf0
7
+ data.tar.gz: 479a9046ae2618b168871e4ac824285558d1d727233cfccc6fc05defd47005c489775d491bfd1e69339f89314b1e4bc19f0522f6b204d4eb12251241458c6706
@@ -26,7 +26,8 @@ Gem::Specification.new do |spec|
26
26
  spec.add_dependency 'octokit'
27
27
  spec.add_dependency 'wunderground'
28
28
  spec.add_dependency 'LocalFileCache'
29
- spec.add_development_dependency "rspec"
29
+ spec.add_dependency 'tiny_config'
30
+ spec.add_development_dependency "rspec", "> 3.0.0"
30
31
  spec.add_development_dependency "guard-rspec"
31
32
  spec.add_development_dependency "dotenv"
32
33
  spec.add_development_dependency "bundler", "~> 1.3"
@@ -2,7 +2,6 @@ class Everlog
2
2
  class Inf::Cache::File < Inf::Cache
3
3
  require 'LocalFileCache'
4
4
  require 'everlog/inf/cache/file/wunderground'
5
- require 'pry'
6
5
 
7
6
  def initialize
8
7
  service = self.class.name.split('::').last.downcase
@@ -1,3 +1,3 @@
1
1
  class Everlog
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -4,7 +4,7 @@ describe Everlog::Dom::Module::Evernote do
4
4
  describe '#publish' do
5
5
  subject { described_class.publish('title', 'content', false) }
6
6
  before do
7
- Everlog::Dom::Repository::Evernote.any_instance.should_receive(:save).with('title', 'content')
7
+ expect_any_instance_of(Everlog::Dom::Repository::Evernote).to receive(:save).with('title', 'content')
8
8
  end
9
9
 
10
10
  it { expect { subject }.not_to raise_error }
@@ -15,7 +15,7 @@ describe Everlog::Dom::Module::Github do
15
15
  subject { instance.repo_names }
16
16
  before do
17
17
  response = [double('api_client', full_name: 'everlog')]
18
- Everlog::Inf::Api::Github.any_instance.stub(:repos).and_return(response)
18
+ allow_any_instance_of(Everlog::Inf::Api::Github).to receive(:repos).and_return(response)
19
19
  end
20
20
 
21
21
  it { expect(subject).to eq ['everlog'] }
@@ -34,7 +34,7 @@ describe Everlog::Dom::Module::Github do
34
34
  context 'with no commit existing' do
35
35
  let(:date) { '9999-09-09' }
36
36
  before do
37
- described_class.any_instance.should_receive(:commits).with('everlog', '9999-09-09').and_return(nil)
37
+ expect_any_instance_of(described_class).to receive(:commits).with('everlog', '9999-09-09').and_return(nil)
38
38
  end
39
39
 
40
40
  it { expect(subject).to be_nil }
@@ -62,15 +62,15 @@ describe Everlog::Dom::Module::Github do
62
62
  subject { described_class.fetch_since((DateTime.now - 1).to_time) }
63
63
 
64
64
  context 'with no repository existing' do
65
- before { Everlog::Dom::Module::Github.any_instance.stub(:repo_names).and_return([]) }
65
+ before { allow_any_instance_of(Everlog::Dom::Module::Github).to receive(:repo_names).and_return([]) }
66
66
 
67
67
  it { expect(subject).to eq [] }
68
68
  end
69
69
 
70
70
  context 'with no commit existing in repository' do
71
71
  before do
72
- Everlog::Dom::Module::Github.any_instance.stub(:repo_activity).and_return(nil)
73
- Everlog::Dom::Module::Github.any_instance.stub(:repo_names).and_return(['Everlog'])
72
+ allow_any_instance_of(Everlog::Dom::Module::Github).to receive(:repo_activity).and_return(nil)
73
+ allow_any_instance_of(Everlog::Dom::Module::Github).to receive(:repo_names).and_return(['Everlog'])
74
74
  end
75
75
 
76
76
  it { expect(subject).to eq [] }
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  describe Everlog::Dom::Module::Hatena do
4
4
  describe '.fetch_since' do
5
5
  subject { described_class.fetch_since (DateTime.now - 1).to_time }
6
- before { Everlog::Inf::Api::Hatena.any_instance.stub(:feed_entry).and_return(response) }
6
+ before { allow_any_instance_of(Everlog::Inf::Api::Hatena).to receive(:feed_entry).and_return(response) }
7
7
 
8
8
  let(:valid_date_feed) do
9
9
  { 'title' => 'hello', 'link' => [{'href' => 'link'}], 'issued' => DateTime.now.to_time }
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Everlog::Dom::Module::Moves do
3
+ xdescribe Everlog::Dom::Module::Moves do
4
4
  let(:instance) do
5
5
  described_class.new
6
6
  end
@@ -10,7 +10,7 @@ describe Everlog::Dom::Module::Moves do
10
10
 
11
11
  context 'normal' do
12
12
  before do
13
- described_class.any_instance.stub_chain(:moves_api, :daily_storyline).and_return(response)
13
+ allow_any_instance_of(described_class).to receive_message_chain(:moves_api, :daily_storyline).and_return(response)
14
14
  end
15
15
  let(:response) do
16
16
  load_fixture('moves/daily_storyline_response.json').first['segments']
@@ -25,7 +25,7 @@ describe Everlog::Dom::Module::Moves do
25
25
  subject { instance.summary }
26
26
 
27
27
  context 'normal' do
28
- before { described_class.any_instance.stub_chain(:moves_api, :daily_summary).and_return(response) }
28
+ before { allow_any_instance_of(described_class).to receive_message_chain(:moves_api, :daily_summary).and_return(response) }
29
29
 
30
30
  let(:response) do
31
31
  load_fixture('moves/daily_summary_response.json').first['summary']
@@ -4,7 +4,7 @@ describe Everlog::Dom::Module::Twitter do
4
4
 
5
5
  describe '.fetch_since' do
6
6
  subject { described_class.fetch_since (DateTime.now - 1).to_time }
7
- before { Everlog::Inf::Api::Twitter.any_instance.stub(:timeline).and_return(response) }
7
+ before { allow_any_instance_of(Everlog::Inf::Api::Twitter).to receive(:timeline).and_return(response) }
8
8
 
9
9
  let(:valid_date_tweet) { double('Twitter:Tweet', text: 'hello', created_at: DateTime.now.to_time) }
10
10
  let(:invalid_date_tweet) { double('Twitter:Tweet', text: 'invalid date', created_at: (DateTime.now - 2).to_time) }
@@ -5,7 +5,7 @@ describe Everlog::Dom::Module::Weather do
5
5
  describe '.fetch_since' do
6
6
  before do
7
7
  response = load_fixture('wunderground/yesterday_response.json')['response']
8
- Everlog::Inf::Api::Wunderground.any_instance.should_receive(:yesterday).and_return(response)
8
+ expect_any_instance_of(Everlog::Inf::Api::Wunderground).to receive(:yesterday).and_return(response)
9
9
  end
10
10
 
11
11
  subject { described_class.fetch_since('dummy') }
@@ -18,7 +18,7 @@ describe Everlog::Dom::Repository::Evernote do
18
18
  let(:notebook_name) { 'something not existing' }
19
19
  it do
20
20
  api_mock = double('api_client', { guid: 1 })
21
- Everlog::Inf::Api::Evernote.any_instance.should_receive(:create_notebook).and_return(api_mock)
21
+ expect_any_instance_of(Everlog::Inf::Api::Evernote).to receive(:create_notebook).and_return(api_mock)
22
22
  expect(subject).to be 1
23
23
  end
24
24
  end
@@ -12,6 +12,6 @@ describe Everlog::Dom::Value::Moves::Referer::Place do
12
12
 
13
13
  describe '#screen_name' do
14
14
  subject { instance.screen_name }
15
- it { expect(subject).to eq "O18, スモレンスク ロシア" }
15
+ it { is_expected.to match /ロシア/ }
16
16
  end
17
17
  end
@@ -20,7 +20,7 @@ describe Everlog::Inf::Api::Evernote do
20
20
  end
21
21
 
22
22
  describe '#post_note' do
23
- before { EvernoteOAuth::Client.any_instance.stub_chain(:note_store, :createNote) }
23
+ before { allow_any_instance_of(EvernoteOAuth::Client).to receive_message_chain(:note_store, :createNote) }
24
24
  let(:content) do
25
25
  <<EOS
26
26
  <?xml version='1.0' encoding='UTF-8'?>
@@ -8,7 +8,7 @@ describe Everlog::Inf::Api::Wunderground do
8
8
  describe '#yesterday' do
9
9
  it { expect { instance.yesterday('Tokyo') }.not_to raise_error }
10
10
  it 'read from cache' do
11
- LocalFileCache.any_instance.should_receive(:get).once.and_return('sunny')
11
+ expect_any_instance_of(LocalFileCache).to receive(:get).once.and_return('sunny')
12
12
 
13
13
  # 一度目はcacheにセットされる
14
14
  expect { instance.yesterday('Tokyo').not_to raise_error }
metadata CHANGED
@@ -1,195 +1,209 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: everlog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - gong023
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-13 00:00:00.000000000 Z
11
+ date: 2015-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: evernote_oauth
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: twitter
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 5.7.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 5.7.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: moves
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: geocoder
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: hatena-bookmark
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: octokit
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: wunderground
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: LocalFileCache
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '>='
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
- name: rspec
126
+ name: tiny_config
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - '>='
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
- type: :development
132
+ type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - '>='
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rspec
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">"
144
+ - !ruby/object:Gem::Version
145
+ version: 3.0.0
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">"
151
+ - !ruby/object:Gem::Version
152
+ version: 3.0.0
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: guard-rspec
141
155
  requirement: !ruby/object:Gem::Requirement
142
156
  requirements:
143
- - - '>='
157
+ - - ">="
144
158
  - !ruby/object:Gem::Version
145
159
  version: '0'
146
160
  type: :development
147
161
  prerelease: false
148
162
  version_requirements: !ruby/object:Gem::Requirement
149
163
  requirements:
150
- - - '>='
164
+ - - ">="
151
165
  - !ruby/object:Gem::Version
152
166
  version: '0'
153
167
  - !ruby/object:Gem::Dependency
154
168
  name: dotenv
155
169
  requirement: !ruby/object:Gem::Requirement
156
170
  requirements:
157
- - - '>='
171
+ - - ">="
158
172
  - !ruby/object:Gem::Version
159
173
  version: '0'
160
174
  type: :development
161
175
  prerelease: false
162
176
  version_requirements: !ruby/object:Gem::Requirement
163
177
  requirements:
164
- - - '>='
178
+ - - ">="
165
179
  - !ruby/object:Gem::Version
166
180
  version: '0'
167
181
  - !ruby/object:Gem::Dependency
168
182
  name: bundler
169
183
  requirement: !ruby/object:Gem::Requirement
170
184
  requirements:
171
- - - ~>
185
+ - - "~>"
172
186
  - !ruby/object:Gem::Version
173
187
  version: '1.3'
174
188
  type: :development
175
189
  prerelease: false
176
190
  version_requirements: !ruby/object:Gem::Requirement
177
191
  requirements:
178
- - - ~>
192
+ - - "~>"
179
193
  - !ruby/object:Gem::Version
180
194
  version: '1.3'
181
195
  - !ruby/object:Gem::Dependency
182
196
  name: rake
183
197
  requirement: !ruby/object:Gem::Requirement
184
198
  requirements:
185
- - - '>='
199
+ - - ">="
186
200
  - !ruby/object:Gem::Version
187
201
  version: '0'
188
202
  type: :development
189
203
  prerelease: false
190
204
  version_requirements: !ruby/object:Gem::Requirement
191
205
  requirements:
192
- - - '>='
206
+ - - ">="
193
207
  - !ruby/object:Gem::Version
194
208
  version: '0'
195
209
  description: post log got from third paty to evernote
@@ -199,8 +213,8 @@ executables: []
199
213
  extensions: []
200
214
  extra_rdoc_files: []
201
215
  files:
202
- - .gitignore
203
- - .rspec
216
+ - ".gitignore"
217
+ - ".rspec"
204
218
  - Gemfile
205
219
  - Guardfile
206
220
  - LICENSE.txt
@@ -306,17 +320,17 @@ require_paths:
306
320
  - lib
307
321
  required_ruby_version: !ruby/object:Gem::Requirement
308
322
  requirements:
309
- - - '>='
323
+ - - ">="
310
324
  - !ruby/object:Gem::Version
311
325
  version: '0'
312
326
  required_rubygems_version: !ruby/object:Gem::Requirement
313
327
  requirements:
314
- - - '>='
328
+ - - ">="
315
329
  - !ruby/object:Gem::Version
316
330
  version: '0'
317
331
  requirements: []
318
332
  rubyforge_project:
319
- rubygems_version: 2.0.3
333
+ rubygems_version: 2.2.2
320
334
  signing_key:
321
335
  specification_version: 4
322
336
  summary: post lifelog to evernote