buttercms 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/buttercms/blog_controller.rb +3 -6
- data/lib/buttercms/version.rb +1 -1
- metadata +18 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 213c4e3b0d9409ef01f566115ee59ac79c1ffd6a
|
4
|
+
data.tar.gz: 936f410d199bf0bc5f9aa1fa49364f5d10fc9885
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e906ef1e61db4a768425715d96fc0ecc75d39f53d4ea9a0d958cfa1c9a7f2e7ef5b588e047609308c9fbc35af6101b5a925ca3fbc6818909d0bdb6a988a929da
|
7
|
+
data.tar.gz: 85ec67f19e0dd63aeed49feff44178268e3f67e22d488f298eee027c4e163abadacba75707c18879830f894e50d0ba75cddd6925fbad21718e683a7d604d7406
|
@@ -50,13 +50,11 @@ module Buttercms
|
|
50
50
|
def make_butter_request(path)
|
51
51
|
begin
|
52
52
|
# Get the content. If it takes longer than 10 seconds timeout.
|
53
|
-
|
54
|
-
response = RestClient.get "http://staging.buttercms.com/api/#{path}", {:Authorization => "Token #{get_butter_token}", :timeout => 10}
|
53
|
+
response = RestClient.get "#{API_URL}#{path}", {:Authorization => "Token #{get_butter_token}", :timeout => 10}
|
55
54
|
rescue SocketError => e
|
56
55
|
raise Buttercms::ConnectionError
|
57
56
|
rescue => e
|
58
|
-
|
59
|
-
if e.respond_to? :xxxxx
|
57
|
+
if e.respond_to? :response
|
60
58
|
case e.response.code
|
61
59
|
when 404
|
62
60
|
butter_not_found
|
@@ -67,7 +65,7 @@ module Buttercms
|
|
67
65
|
end
|
68
66
|
else
|
69
67
|
# In the event that e doesn't have a response due to network issue (Errno::ENETUNREACH)
|
70
|
-
raise Buttercms::
|
68
|
+
raise Buttercms::ConnectionError
|
71
69
|
end
|
72
70
|
|
73
71
|
end
|
@@ -104,7 +102,6 @@ module Buttercms
|
|
104
102
|
|
105
103
|
response = make_butter_request("posts/#{page_param}")
|
106
104
|
response_json = JSON.parse(response)
|
107
|
-
p response_json
|
108
105
|
@next_page = response_json['next_page']
|
109
106
|
@previous_page = response_json['previous_page']
|
110
107
|
@recent_posts = response_json['results']
|
data/lib/buttercms/version.rb
CHANGED
metadata
CHANGED
@@ -1,97 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: buttercms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ButterCms
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.8'
|
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: '1.8'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rest-client
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.8'
|
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: '1.8'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.7'
|
48
48
|
type: :development
|
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: '1.7'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '10.0'
|
62
62
|
type: :development
|
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: '10.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rails
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - ~>
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 4.2.1
|
76
76
|
type: :development
|
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: 4.2.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: sqlite3
|
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: :development
|
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
|
description: Butter makes setting up a company blog on Rails insanely easy. It's built
|
@@ -103,7 +103,7 @@ executables: []
|
|
103
103
|
extensions: []
|
104
104
|
extra_rdoc_files: []
|
105
105
|
files:
|
106
|
-
- .gitignore
|
106
|
+
- ".gitignore"
|
107
107
|
- Gemfile
|
108
108
|
- MIT-LICENSE
|
109
109
|
- README.rst
|
@@ -193,17 +193,17 @@ require_paths:
|
|
193
193
|
- lib
|
194
194
|
required_ruby_version: !ruby/object:Gem::Requirement
|
195
195
|
requirements:
|
196
|
-
- -
|
196
|
+
- - ">="
|
197
197
|
- !ruby/object:Gem::Version
|
198
198
|
version: '0'
|
199
199
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
200
200
|
requirements:
|
201
|
-
- -
|
201
|
+
- - ">="
|
202
202
|
- !ruby/object:Gem::Version
|
203
203
|
version: '0'
|
204
204
|
requirements: []
|
205
205
|
rubyforge_project:
|
206
|
-
rubygems_version: 2.4.
|
206
|
+
rubygems_version: 2.4.5
|
207
207
|
signing_key:
|
208
208
|
specification_version: 4
|
209
209
|
summary: Company blogs as a service. Built for developers.
|