buttercms-ruby 1.3.0 → 1.3.1

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: 3b1eb7961f35d03a98b64dd179718d91cef63533
4
- data.tar.gz: 0a39f2a75b721b3a859b413ffa0f2d91d1528bbb
3
+ metadata.gz: 9de83f2608d6151ad7cb1a4e5cbb421eedc50c16
4
+ data.tar.gz: '09ec3183b0a0913b19eeea19794026b45f48f1b7'
5
5
  SHA512:
6
- metadata.gz: 5620747eb99c3e1041106cdef205f259bdd63d8d2cc5fce2aa3af4639ddc2217135c2d707fde892b1a68555d43986ff21af6442ff44aca4f2c091a4bccd243ee
7
- data.tar.gz: 1d964a1a8f9554fea737dc4f98b5a86df3902cfa2113f8da607082ae6a5766501494604b57ca70c28d076841bf534c350079dc57619880c02a172fee006836e1
6
+ metadata.gz: 53ed13bbeac2651fbaa0263620f6babc82fd1fa15aa19dd0c0ddeeea548848f74ca7b593cf8f47d4561c31a6f1102adfada66c9d427a61545e9976d39f70a976
7
+ data.tar.gz: 75e9e2eceab99f44da81d95c26580f6afe29bac611c479c14db268c856e929a72d6116aa9a5c9873dc3685cc7291036f6e81f11cc653a240bf0a3bb20802e235
data/README.md CHANGED
@@ -50,11 +50,17 @@ p tags
50
50
  rss_feed = ButterCMS::Feed.find(:rss)
51
51
  puts rss_feed.data
52
52
 
53
+ # Content fields
53
54
  content = ButterCMS::Content.fetch([
54
55
  :homepage_html_title,
55
56
  :homepage_meta_description,
56
57
  :homepage_headline
57
58
  ])
59
+
60
+ # Pages
61
+ pages = ButterCMS::Page.list('news')
62
+
63
+ page = ButterCMS::Page.get('news', 'hello-world')
58
64
  ```
59
65
 
60
66
  ## Localization
@@ -86,4 +92,8 @@ Test mode can be used to setup a staging website for previewing content or for t
86
92
 
87
93
  ```ruby
88
94
  ButterCMS::test_mode = true
89
- ```
95
+ ```
96
+
97
+ ### Other
98
+
99
+ View Ruby [Blog engine](https://buttercms.com/ruby-blog-engine/) and [Full CMS](https://buttercms.com/ruby-cms/) for other examples of using ButterCMS with Ruby.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0
1
+ 1.3.1
@@ -15,6 +15,7 @@ require 'buttercms/tag'
15
15
  require 'buttercms/post'
16
16
  require 'buttercms/feed'
17
17
  require 'buttercms/content'
18
+ require 'buttercms/page'
18
19
 
19
20
  # See https://github.com/jruby/jruby/issues/3113
20
21
  if RUBY_VERSION < '2.0.0'
@@ -0,0 +1,19 @@
1
+ module ButterCMS
2
+ class Page < ButterResource
3
+ def self.resource_path
4
+ "/pages/"
5
+ end
6
+
7
+ def self.list(page_type, options = {})
8
+ response = ButterCMS.request(self.endpoint(page_type), options)
9
+
10
+ self.create_collection(response)
11
+ end
12
+
13
+ def self.get(page_type, slug, options = {})
14
+ response = ButterCMS.request(self.endpoint("#{page_type}/#{slug}"), options)
15
+
16
+ self.create_object(response)
17
+ end
18
+ end
19
+ end
@@ -1,3 +1,3 @@
1
1
  module ButterCMS
2
- VERSION = '1.3.0'
2
+ VERSION = '1.3.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buttercms-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ButterCMS
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-24 00:00:00.000000000 Z
11
+ date: 2017-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -65,6 +65,7 @@ files:
65
65
  - lib/buttercms/errors.rb
66
66
  - lib/buttercms/feed.rb
67
67
  - lib/buttercms/hash_to_object.rb
68
+ - lib/buttercms/page.rb
68
69
  - lib/buttercms/post.rb
69
70
  - lib/buttercms/tag.rb
70
71
  - lib/buttercms/version.rb