refinerycms-api 1.0.0.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +21 -0
  3. data/.rbenv-gemsets +1 -0
  4. data/.ruby-version +1 -0
  5. data/.travis.yml +12 -0
  6. data/Gemfile +57 -0
  7. data/LICENSE +27 -0
  8. data/Rakefile +21 -0
  9. data/app/controllers/refinery/api/base_controller.rb +174 -0
  10. data/app/controllers/refinery/api/v1/blog/posts_controller.rb +78 -0
  11. data/app/controllers/refinery/api/v1/images_controller.rb +76 -0
  12. data/app/controllers/refinery/api/v1/inquiries/inquiries_controller.rb +69 -0
  13. data/app/controllers/refinery/api/v1/pages_controller.rb +77 -0
  14. data/app/controllers/refinery/api/v1/resources_controller.rb +66 -0
  15. data/app/decorators/models/refinery/authentication/devise/user_decorator.rb +5 -0
  16. data/app/helpers/refinery/api/api_helpers.rb +54 -0
  17. data/app/models/concerns/refinery/user_api_authentication.rb +19 -0
  18. data/app/models/refinery/ability.rb +59 -0
  19. data/app/views/refinery/api/errors/gateway_error.v1.rabl +2 -0
  20. data/app/views/refinery/api/errors/invalid_api_key.v1.rabl +2 -0
  21. data/app/views/refinery/api/errors/invalid_resource.v1.rabl +3 -0
  22. data/app/views/refinery/api/errors/must_specify_api_key.v1.rabl +2 -0
  23. data/app/views/refinery/api/errors/not_found.v1.rabl +2 -0
  24. data/app/views/refinery/api/errors/unauthorized.v1.rabl +2 -0
  25. data/app/views/refinery/api/v1/blog/posts/index.v1.rabl +5 -0
  26. data/app/views/refinery/api/v1/blog/posts/new.v1.rabl +3 -0
  27. data/app/views/refinery/api/v1/blog/posts/show.v1.rabl +5 -0
  28. data/app/views/refinery/api/v1/images/index.v1.rabl +5 -0
  29. data/app/views/refinery/api/v1/images/new.v1.rabl +3 -0
  30. data/app/views/refinery/api/v1/images/show.v1.rabl +6 -0
  31. data/app/views/refinery/api/v1/inquiries/inquiries/index.v1.rabl +5 -0
  32. data/app/views/refinery/api/v1/inquiries/inquiries/new.v1.rabl +3 -0
  33. data/app/views/refinery/api/v1/inquiries/inquiries/show.v1.rabl +5 -0
  34. data/app/views/refinery/api/v1/pages/index.v1.rabl +8 -0
  35. data/app/views/refinery/api/v1/pages/new.v1.rabl +3 -0
  36. data/app/views/refinery/api/v1/pages/pages.v1.rabl +5 -0
  37. data/app/views/refinery/api/v1/pages/show.v1.rabl +9 -0
  38. data/app/views/refinery/api/v1/resources/index.v1.rabl +5 -0
  39. data/app/views/refinery/api/v1/resources/new.v1.rabl +3 -0
  40. data/app/views/refinery/api/v1/resources/show.v1.rabl +6 -0
  41. data/bin/rails +5 -0
  42. data/bin/rake +21 -0
  43. data/bin/rspec +22 -0
  44. data/bin/spring +18 -0
  45. data/config/initializers/metal_load_paths.rb +1 -0
  46. data/config/locales/en.yml +27 -0
  47. data/config/routes.rb +24 -0
  48. data/db/migrate/20160501141738_add_api_key_to_refinery_authentication_devise_users.rb +8 -0
  49. data/lib/generators/refinery/api/api_generator.rb +16 -0
  50. data/lib/generators/refinery/api/templates/config/initializers/refinery/api.rb.erb +7 -0
  51. data/lib/refinery/api.rb +29 -0
  52. data/lib/refinery/api/configuration.rb +32 -0
  53. data/lib/refinery/api/controller_helpers/auth.rb +76 -0
  54. data/lib/refinery/api/controller_helpers/strong_parameters.rb +37 -0
  55. data/lib/refinery/api/controller_setup.rb +20 -0
  56. data/lib/refinery/api/engine.rb +52 -0
  57. data/lib/refinery/api/responders.rb +11 -0
  58. data/lib/refinery/api/responders/rabl_template.rb +30 -0
  59. data/lib/refinery/api/testing_support/caching.rb +10 -0
  60. data/lib/refinery/api/testing_support/helpers.rb +44 -0
  61. data/lib/refinery/api/testing_support/setup.rb +16 -0
  62. data/lib/refinery/permitted_attributes.rb +40 -0
  63. data/lib/refinery/responder.rb +45 -0
  64. data/lib/refinerycms-api.rb +3 -0
  65. data/readme.md +69 -0
  66. data/refinerycms_api.gemspec +22 -0
  67. data/script/rails +9 -0
  68. data/spec/controllers/refinery/api/base_controller_spec.rb +73 -0
  69. data/spec/controllers/refinery/api/v1/blog/posts_controller_spec.rb +140 -0
  70. data/spec/controllers/refinery/api/v1/images_controller_spec.rb +93 -0
  71. data/spec/controllers/refinery/api/v1/inquiries/inquiries_controller_spec.rb +126 -0
  72. data/spec/controllers/refinery/api/v1/pages_controller_spec.rb +150 -0
  73. data/spec/controllers/refinery/api/v1/resources_controller_spec.rb +94 -0
  74. data/spec/fixtures/refinery_is_awesome.txt +1 -0
  75. data/spec/fixtures/thinking-cat.jpg +0 -0
  76. data/spec/models/refinery/user_spec.rb +23 -0
  77. data/spec/requests/rabl_cache_spec.rb +17 -0
  78. data/spec/requests/ransackable_attributes_spec.rb +80 -0
  79. data/spec/requests/version_spec.rb +23 -0
  80. data/spec/shared_examples/protect_product_actions.rb +17 -0
  81. data/spec/spec_helper.rb +77 -0
  82. data/spec/support/controller_hacks.rb +33 -0
  83. data/spec/support/database_cleaner.rb +14 -0
  84. data/spec/support/have_attributes_matcher.rb +9 -0
  85. data/tasks/refinery_api.rake +14 -0
  86. data/tasks/rspec.rake +4 -0
  87. metadata +240 -0
@@ -0,0 +1 @@
1
+ http://www.refineryhq.com/
@@ -0,0 +1,23 @@
1
+ require 'spec_helper'
2
+
3
+ module Refinery
4
+ describe "User", type: :model do
5
+ before do
6
+ allow(Refinery::Api).to receive(:user_class).and_return(Refinery::Authentication::Devise::User)
7
+ end
8
+
9
+ let(:user) { Refinery::Api.user_class.new }
10
+
11
+ it "can generate an API key" do
12
+ expect(user).to receive(:save!)
13
+ user.generate_refinery_api_key!
14
+ expect(user.refinery_api_key).not_to be_blank
15
+ end
16
+
17
+ it "can clear an API key" do
18
+ expect(user).to receive(:save!)
19
+ user.clear_refinery_api_key!
20
+ expect(user.refinery_api_key).to be_blank
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Rabl Cache", type: :request, caching: true do
4
+ before do
5
+ allow(Refinery::Api).to receive(:requires_authentication).and_return(false)
6
+
7
+ create(:page)
8
+ expect(Refinery::Page.count).to eq(1)
9
+ end
10
+
11
+ it "doesn't create a cache key collision for models with different rabl templates" do
12
+ get "/api/v1/pages"
13
+ expect(response.status).to eq(200)
14
+
15
+ # pending
16
+ end
17
+ end
@@ -0,0 +1,80 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Ransackable Attributes" do
4
+ # TODO: Fix if we use Ransack
5
+ # let(:user) { create(:user).tap(&:generate_refinery_api_key!) }
6
+ # let(:order) { create(:order_with_line_items, user: user) }
7
+ # context "filtering by attributes one association away" do
8
+ # it "does not allow the filtering of variants by order attributes" do
9
+ # 2.times { create(:variant) }
10
+
11
+ # get "/api/v1/variants?q[orders_email_start]=#{order.email}", token: user.refinery_api_key
12
+
13
+ # variants_response = JSON.parse(response.body)
14
+ # expect(variants_response['total_count']).to eq(Refinery::Variant.count)
15
+ # end
16
+ # end
17
+
18
+ # context "filtering by attributes two associations away" do
19
+ # it "does not allow the filtering of variants by user attributes" do
20
+ # 2.times { create(:variant) }
21
+
22
+ # get "/api/v1/variants?q[orders_user_email_start]=#{order.user.email}", token: user.refinery_api_key
23
+
24
+ # variants_response = JSON.parse(response.body)
25
+ # expect(variants_response['total_count']).to eq(Refinery::Variant.count)
26
+ # end
27
+ # end
28
+
29
+ # context "it maintains desired association behavior" do
30
+ # it "allows filtering of variants product name" do
31
+ # product = create(:product, name: "Fritos")
32
+ # variant = create(:variant, product: product)
33
+ # other_variant = create(:variant)
34
+
35
+ # get "/api/v1/variants?q[product_name_or_sku_cont]=fritos", token: user.refinery_api_key
36
+
37
+ # skus = JSON.parse(response.body)['variants'].map { |variant| variant['sku'] }
38
+ # expect(skus).to include variant.sku
39
+ # expect(skus).not_to include other_variant.sku
40
+ # end
41
+ # end
42
+
43
+ # context "filtering by attributes" do
44
+ # it "most attributes are not filterable by default" do
45
+ # product = create(:product, meta_title: "special product")
46
+ # other_product = create(:product)
47
+
48
+ # get "/api/v1/products?q[meta_title_cont]=special", token: user.refinery_api_key
49
+
50
+ # products_response = JSON.parse(response.body)
51
+ # expect(products_response['total_count']).to eq(Refinery::Product.count)
52
+ # end
53
+
54
+ # it "id is filterable by default" do
55
+ # product = create(:product)
56
+ # other_product = create(:product)
57
+
58
+ # get "/api/v1/products?q[id_eq]=#{product.id}", token: user.refinery_api_key
59
+
60
+ # product_names = JSON.parse(response.body)['products'].map { |product| product['name'] }
61
+ # expect(product_names).to include product.name
62
+ # expect(product_names).not_to include other_product.name
63
+ # end
64
+ # end
65
+
66
+ # context "filtering by whitelisted attributes" do
67
+ # it "filtering is supported for whitelisted attributes" do
68
+ # product = create(:product, name: "Fritos")
69
+ # other_product = create(:product)
70
+
71
+ # get "/api/v1/products?q[name_cont]=fritos", token: user.refinery_api_key
72
+
73
+ # product_names = JSON.parse(response.body)['products'].map { |product| product['name'] }
74
+ # expect(product_names).to include product.name
75
+ # expect(product_names).not_to include other_product.name
76
+ # end
77
+ # end
78
+
79
+
80
+ end
@@ -0,0 +1,23 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Version", type: :request do
4
+ let!(:pages) { 2.times.map { FactoryGirl.create(:page) } }
5
+
6
+ before do
7
+ allow(Refinery::Api).to receive(:requires_authentication).and_return(false)
8
+ end
9
+
10
+ describe "/api" do
11
+ it "be a redirect" do
12
+ get "/api/pages"
13
+ expect(response).to have_http_status 301
14
+ end
15
+ end
16
+
17
+ describe "/api/v1" do
18
+ it "be successful" do
19
+ get "/api/v1/pages"
20
+ expect(response).to have_http_status 200
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,17 @@
1
+ shared_examples "modifying product actions are restricted" do
2
+ it "cannot create a new product if not an admin" do
3
+ api_post :create, :product => { :name => "Brand new product!" }
4
+ assert_unauthorized!
5
+ end
6
+
7
+ it "cannot update a product" do
8
+ api_put :update, :id => product.to_param, :product => { :name => "I hacked your store!" }
9
+ assert_unauthorized!
10
+ end
11
+
12
+ it "cannot delete a product" do
13
+ api_delete :destroy, :id => product.to_param
14
+ assert_unauthorized!
15
+ end
16
+ end
17
+
@@ -0,0 +1,77 @@
1
+ require 'rubygems'
2
+
3
+ # Configure Rails Environment
4
+ ENV["RAILS_ENV"] ||= 'test'
5
+
6
+
7
+ if ENV["COVERAGE"]
8
+ # Run Coverage report
9
+ require 'simplecov'
10
+ SimpleCov.start do
11
+ add_group 'Controllers', 'app/controllers'
12
+ add_group 'Helpers', 'app/helpers'
13
+ add_group 'Mailers', 'app/mailers'
14
+ add_group 'Models', 'app/models'
15
+ add_group 'Views', 'app/views'
16
+ add_group 'Libraries', 'lib'
17
+ end
18
+ end
19
+
20
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
21
+ ENV["RAILS_ENV"] ||= 'test'
22
+
23
+ begin
24
+ require File.expand_path("../dummy/config/environment", __FILE__)
25
+ rescue LoadError
26
+ puts "Could not load dummy application. Please ensure you have run `bundle exec rake test_app`"
27
+ exit
28
+ end
29
+
30
+ require 'rspec/rails'
31
+ # require 'ffaker'
32
+ require 'capybara/rspec'
33
+
34
+
35
+ # Requires supporting ruby files with custom matchers and macros, etc,
36
+ # in spec/support/ and its subdirectories.
37
+ Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each {|f| require f}
38
+
39
+ # require 'refinery/testing_support/factories'
40
+ # require 'refinery/testing_support/preferences'
41
+
42
+ require 'refinery/api/testing_support/caching'
43
+ require 'refinery/api/testing_support/helpers'
44
+ require 'refinery/api/testing_support/setup'
45
+ # require 'refinery/testing_support/shoulda_matcher_configuration'
46
+
47
+ RSpec.configure do |config|
48
+ config.mock_with :rspec
49
+ config.filter_run :focus => true
50
+ config.run_all_when_everything_filtered = true
51
+ config.backtrace_exclusion_patterns = %w(
52
+ rails actionpack railties capybara activesupport rack warden rspec actionview
53
+ activerecord dragonfly benchmark
54
+ ).map { |noisy| /#{noisy}/ }
55
+ config.color = true
56
+ config.fail_fast = ENV['FAIL_FAST'] || false
57
+ config.infer_spec_type_from_file_location!
58
+ config.raise_errors_for_deprecations!
59
+ config.use_transactional_fixtures = true
60
+
61
+ config.include FactoryGirl::Syntax::Methods
62
+ config.include Refinery::Api::TestingSupport::Helpers, :type => :controller
63
+ config.extend Refinery::Api::TestingSupport::Setup, :type => :controller
64
+ # config.include Refinery::TestingSupport::Preferences, :type => :controller
65
+
66
+ config.before do
67
+ Refinery::Api.requires_authentication = true
68
+ end
69
+ end
70
+
71
+ # Requires supporting files with custom matchers and macros, etc,
72
+ # in ./support/ and its subdirectories including factories.
73
+ ([Rails.root.to_s] | ::Refinery::Plugins.registered.pathnames).map{|p|
74
+ Dir[File.join(p, 'spec', 'support', '**', '*.rb').to_s]
75
+ }.flatten.sort.each do |support_file|
76
+ require support_file
77
+ end
@@ -0,0 +1,33 @@
1
+ require 'active_support/all'
2
+ module ControllerHacks
3
+ extend ActiveSupport::Concern
4
+
5
+ included do
6
+ routes { Refinery::Core::Engine.routes }
7
+ end
8
+
9
+ def api_get(action, params={}, session=nil, flash=nil)
10
+ api_process(action, params, session, flash, "GET")
11
+ end
12
+
13
+ def api_post(action, params={}, session=nil, flash=nil)
14
+ api_process(action, params, session, flash, "POST")
15
+ end
16
+
17
+ def api_put(action, params={}, session=nil, flash=nil)
18
+ api_process(action, params, session, flash, "PUT")
19
+ end
20
+
21
+ def api_delete(action, params={}, session=nil, flash=nil)
22
+ api_process(action, params, session, flash, "DELETE")
23
+ end
24
+
25
+ def api_process(action, params={}, session=nil, flash=nil, method="get")
26
+ scoping = respond_to?(:resource_scoping) ? resource_scoping : {}
27
+ process(action, method, params.merge(scoping).reverse_merge!(:format => :json), session, flash)
28
+ end
29
+ end
30
+
31
+ RSpec.configure do |config|
32
+ config.include ControllerHacks, type: :controller
33
+ end
@@ -0,0 +1,14 @@
1
+ RSpec.configure do |config|
2
+ config.before(:suite) do
3
+ DatabaseCleaner.strategy = :transaction
4
+ DatabaseCleaner.clean_with(:truncation)
5
+ end
6
+
7
+ config.before(:each) do
8
+ DatabaseCleaner.start
9
+ end
10
+
11
+ config.after(:each) do
12
+ DatabaseCleaner.clean
13
+ end
14
+ end
@@ -0,0 +1,9 @@
1
+ RSpec::Matchers.define :have_attributes do |expected_attributes|
2
+ match do |actual|
3
+ # actual is a Hash object representing an object, like this:
4
+ # { "name" => "Product #1" }
5
+ actual_attributes = actual.keys.map(&:to_sym)
6
+ expected_attributes.map(&:to_sym).all? { |attr| actual_attributes.include?(attr) }
7
+ end
8
+ end
9
+
@@ -0,0 +1,14 @@
1
+ namespace :refinery_api do
2
+ namespace :user do
3
+ namespace :api_token do
4
+ desc "Generate user API Token"
5
+ task :generate => :environment do
6
+ raise "USAGE: User email required e.g. 'EMAIL=refinery@example.org'" if ENV["EMAIL"].blank?
7
+ user = Refinery::Api.user_class.find_by_email ENV["EMAIL"]
8
+ user.generate_refinery_api_key! if user.present?
9
+ puts "API TOKEN for #{ENV['EMAIL']}: #{user.refinery_api_key}"
10
+ puts "Done!"
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,4 @@
1
+ require 'rspec/core/rake_task'
2
+
3
+ desc "Run specs"
4
+ RSpec::Core::RakeTask.new
metadata ADDED
@@ -0,0 +1,240 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: refinerycms-api
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0.beta
5
+ platform: ruby
6
+ authors:
7
+ - Brice Sanchez
8
+ - Ryan Bigg
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2016-07-19 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: refinerycms-core
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '3.0'
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 3.0.0
24
+ type: :runtime
25
+ prerelease: false
26
+ version_requirements: !ruby/object:Gem::Requirement
27
+ requirements:
28
+ - - "~>"
29
+ - !ruby/object:Gem::Version
30
+ version: '3.0'
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 3.0.0
34
+ - !ruby/object:Gem::Dependency
35
+ name: cancancan
36
+ requirement: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 1.10.1
41
+ type: :runtime
42
+ prerelease: false
43
+ version_requirements: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 1.10.1
48
+ - !ruby/object:Gem::Dependency
49
+ name: decorators
50
+ requirement: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.0'
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '2.0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: rabl
64
+ requirement: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.12.0
69
+ type: :runtime
70
+ prerelease: false
71
+ version_requirements: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.12.0
76
+ - !ruby/object:Gem::Dependency
77
+ name: versioncake
78
+ requirement: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 2.3.1
83
+ type: :runtime
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 2.3.1
90
+ - !ruby/object:Gem::Dependency
91
+ name: responders
92
+ requirement: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ type: :runtime
98
+ prerelease: false
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ description: Refinery CMS's API
105
+ email:
106
+ executables:
107
+ - rails
108
+ - rake
109
+ - rspec
110
+ - spring
111
+ extensions: []
112
+ extra_rdoc_files: []
113
+ files:
114
+ - ".gitignore"
115
+ - ".rbenv-gemsets"
116
+ - ".ruby-version"
117
+ - ".travis.yml"
118
+ - Gemfile
119
+ - LICENSE
120
+ - Rakefile
121
+ - app/controllers/refinery/api/base_controller.rb
122
+ - app/controllers/refinery/api/v1/blog/posts_controller.rb
123
+ - app/controllers/refinery/api/v1/images_controller.rb
124
+ - app/controllers/refinery/api/v1/inquiries/inquiries_controller.rb
125
+ - app/controllers/refinery/api/v1/pages_controller.rb
126
+ - app/controllers/refinery/api/v1/resources_controller.rb
127
+ - app/decorators/models/refinery/authentication/devise/user_decorator.rb
128
+ - app/helpers/refinery/api/api_helpers.rb
129
+ - app/models/concerns/refinery/user_api_authentication.rb
130
+ - app/models/refinery/ability.rb
131
+ - app/views/refinery/api/errors/gateway_error.v1.rabl
132
+ - app/views/refinery/api/errors/invalid_api_key.v1.rabl
133
+ - app/views/refinery/api/errors/invalid_resource.v1.rabl
134
+ - app/views/refinery/api/errors/must_specify_api_key.v1.rabl
135
+ - app/views/refinery/api/errors/not_found.v1.rabl
136
+ - app/views/refinery/api/errors/unauthorized.v1.rabl
137
+ - app/views/refinery/api/v1/blog/posts/index.v1.rabl
138
+ - app/views/refinery/api/v1/blog/posts/new.v1.rabl
139
+ - app/views/refinery/api/v1/blog/posts/show.v1.rabl
140
+ - app/views/refinery/api/v1/images/index.v1.rabl
141
+ - app/views/refinery/api/v1/images/new.v1.rabl
142
+ - app/views/refinery/api/v1/images/show.v1.rabl
143
+ - app/views/refinery/api/v1/inquiries/inquiries/index.v1.rabl
144
+ - app/views/refinery/api/v1/inquiries/inquiries/new.v1.rabl
145
+ - app/views/refinery/api/v1/inquiries/inquiries/show.v1.rabl
146
+ - app/views/refinery/api/v1/pages/index.v1.rabl
147
+ - app/views/refinery/api/v1/pages/new.v1.rabl
148
+ - app/views/refinery/api/v1/pages/pages.v1.rabl
149
+ - app/views/refinery/api/v1/pages/show.v1.rabl
150
+ - app/views/refinery/api/v1/resources/index.v1.rabl
151
+ - app/views/refinery/api/v1/resources/new.v1.rabl
152
+ - app/views/refinery/api/v1/resources/show.v1.rabl
153
+ - bin/rails
154
+ - bin/rake
155
+ - bin/rspec
156
+ - bin/spring
157
+ - config/initializers/metal_load_paths.rb
158
+ - config/locales/en.yml
159
+ - config/routes.rb
160
+ - db/migrate/20160501141738_add_api_key_to_refinery_authentication_devise_users.rb
161
+ - lib/generators/refinery/api/api_generator.rb
162
+ - lib/generators/refinery/api/templates/config/initializers/refinery/api.rb.erb
163
+ - lib/refinery/api.rb
164
+ - lib/refinery/api/configuration.rb
165
+ - lib/refinery/api/controller_helpers/auth.rb
166
+ - lib/refinery/api/controller_helpers/strong_parameters.rb
167
+ - lib/refinery/api/controller_setup.rb
168
+ - lib/refinery/api/engine.rb
169
+ - lib/refinery/api/responders.rb
170
+ - lib/refinery/api/responders/rabl_template.rb
171
+ - lib/refinery/api/testing_support/caching.rb
172
+ - lib/refinery/api/testing_support/helpers.rb
173
+ - lib/refinery/api/testing_support/setup.rb
174
+ - lib/refinery/permitted_attributes.rb
175
+ - lib/refinery/responder.rb
176
+ - lib/refinerycms-api.rb
177
+ - readme.md
178
+ - refinerycms_api.gemspec
179
+ - script/rails
180
+ - spec/controllers/refinery/api/base_controller_spec.rb
181
+ - spec/controllers/refinery/api/v1/blog/posts_controller_spec.rb
182
+ - spec/controllers/refinery/api/v1/images_controller_spec.rb
183
+ - spec/controllers/refinery/api/v1/inquiries/inquiries_controller_spec.rb
184
+ - spec/controllers/refinery/api/v1/pages_controller_spec.rb
185
+ - spec/controllers/refinery/api/v1/resources_controller_spec.rb
186
+ - spec/fixtures/refinery_is_awesome.txt
187
+ - spec/fixtures/thinking-cat.jpg
188
+ - spec/models/refinery/user_spec.rb
189
+ - spec/requests/rabl_cache_spec.rb
190
+ - spec/requests/ransackable_attributes_spec.rb
191
+ - spec/requests/version_spec.rb
192
+ - spec/shared_examples/protect_product_actions.rb
193
+ - spec/spec_helper.rb
194
+ - spec/support/controller_hacks.rb
195
+ - spec/support/database_cleaner.rb
196
+ - spec/support/have_attributes_matcher.rb
197
+ - tasks/refinery_api.rake
198
+ - tasks/rspec.rake
199
+ homepage: http://www.refinerycms.com
200
+ licenses:
201
+ - BSD-3
202
+ metadata: {}
203
+ post_install_message:
204
+ rdoc_options: []
205
+ require_paths:
206
+ - lib
207
+ required_ruby_version: !ruby/object:Gem::Requirement
208
+ requirements:
209
+ - - ">="
210
+ - !ruby/object:Gem::Version
211
+ version: '0'
212
+ required_rubygems_version: !ruby/object:Gem::Requirement
213
+ requirements:
214
+ - - ">"
215
+ - !ruby/object:Gem::Version
216
+ version: 1.3.1
217
+ requirements: []
218
+ rubyforge_project:
219
+ rubygems_version: 2.4.5
220
+ signing_key:
221
+ specification_version: 4
222
+ summary: Refinery CMS's API
223
+ test_files:
224
+ - spec/controllers/refinery/api/base_controller_spec.rb
225
+ - spec/controllers/refinery/api/v1/blog/posts_controller_spec.rb
226
+ - spec/controllers/refinery/api/v1/images_controller_spec.rb
227
+ - spec/controllers/refinery/api/v1/inquiries/inquiries_controller_spec.rb
228
+ - spec/controllers/refinery/api/v1/pages_controller_spec.rb
229
+ - spec/controllers/refinery/api/v1/resources_controller_spec.rb
230
+ - spec/fixtures/refinery_is_awesome.txt
231
+ - spec/fixtures/thinking-cat.jpg
232
+ - spec/models/refinery/user_spec.rb
233
+ - spec/requests/rabl_cache_spec.rb
234
+ - spec/requests/ransackable_attributes_spec.rb
235
+ - spec/requests/version_spec.rb
236
+ - spec/shared_examples/protect_product_actions.rb
237
+ - spec/spec_helper.rb
238
+ - spec/support/controller_hacks.rb
239
+ - spec/support/database_cleaner.rb
240
+ - spec/support/have_attributes_matcher.rb