activeadmin_active_resource 0.1.1 → 0.2.6

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
- SHA1:
3
- metadata.gz: 693924c691a6662812b9272be525e0749137b642
4
- data.tar.gz: 7351de5cb82fc67a7acb6cf0ab42f3e81c7e4798
2
+ SHA256:
3
+ metadata.gz: 99217ffe9d6e57fd4eda0bd713c760eafb6bf3418765e12ad0b5a76d8bc002cd
4
+ data.tar.gz: 2b41192fec46788df9075ec0d3cdff979f500b25d07e03158566b7b19a05e6f8
5
5
  SHA512:
6
- metadata.gz: b14cee7688627c7865e484161a3b1ccf86ef9c3b8d0f3f6873690647c7454f7c3af2f622a36e7d772b84bc159deee89d80cb6eaaeac6bb624776281790c4eb71
7
- data.tar.gz: eccbba12431224eb4d96c9f36c5de219bdc2b54ade4f505ab951035a5199e6048475307916f27fe19808c36445bcfd290fd75fd84d257253eabb866ede8176bb
6
+ metadata.gz: 47692d3c049165f2e7b92bc272d7c555fdc04a69230be34eb6455c1c8b04ab4bc733487332752ba961b1cdcf23dfb9b3308083ce94a3615916ab827415e726a7
7
+ data.tar.gz: a1ea9e3409e76431f0a67f197ed54a7d7abbd1fdfd8978c3c4c89519f5fcdd9e47daff79e1b08d8dfa920b23200f8e7d3ca64264e62638c180e451ff815e8c9c
@@ -1,4 +1,4 @@
1
- Copyright (c) 2018 Mattia Roccoberton
1
+ Copyright (c) 2020 Mattia Roccoberton
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,32 +1,32 @@
1
- # ActiveAdmin Active Resource [![Gem Version](https://badge.fury.io/rb/activeadmin_active_resource.svg)](https://badge.fury.io/rb/activeadmin_active_resource)
1
+ # Active Admin + Active Resource
2
+ [![Gem Version](https://badge.fury.io/rb/activeadmin_active_resource.svg)](https://badge.fury.io/rb/activeadmin_active_resource) [![CircleCI](https://circleci.com/gh/blocknotes/activeadmin_active_resource.svg?style=svg)](https://circleci.com/gh/blocknotes/activeadmin_active_resource)
2
3
 
3
- An Active Admin plugin to use Active Resource.
4
+ An Active Admin plugin to use a REST API data source in place of a local database using [Active Resource](https://github.com/rails/activeresource).
4
5
 
5
- Data is fetched from an external API.
6
-
7
- WARNING: this component is a Beta version, some Active Admin functionalities don't work as expected:
8
-
9
- - Batch Action: not supported
10
- - Filters: partially supported (see example)
11
- - Edit: fields must be configured explicitly
12
- - Comments: not supported
6
+ **NOTICE**: currently some Active Admin features don't work as expected:
7
+ - Filters are partially supported (see example)
8
+ - Some form fields must be configured explicitly (like the associations)
9
+ - Comments are not supported
13
10
 
14
11
  ## Install
15
-
16
- - Add to your Gemfile:
17
- `gem 'activeadmin_active_resource'`
12
+ - Add to your project's Gemfile (with Active Admin installed): `gem 'activeadmin_active_resource'`
18
13
  - Execute bundle
19
- - Disable comments in active_admin config initializer
14
+ - Disable comments in Active Admin config initializer (`config.comments = false`)
20
15
 
21
- ## Example
16
+ ## Examples
17
+ Please take a look at the examples folder:
18
+ - a Rails6 application with Active Admin and this component, see [here](examples/rails6-admin);
19
+ - a Rails6 API application used as data source, see [here](examples/rails6-api).
22
20
 
23
- - Post model:
21
+ For another example check the [specs](spec).
24
22
 
23
+ Basic instructions:
24
+ - Post model:
25
25
  ```rb
26
26
  class Post < ActiveResource::Base
27
- self.site = 'http://localhost:3000'
27
+ self.site = 'http://localhost:3000' # API url: another Rails project, a REST API, etc.
28
28
 
29
- self.schema = {
29
+ self.schema = { # Fields must be declared explicitly
30
30
  id: :integer,
31
31
  title: :string,
32
32
  description: :text,
@@ -40,18 +40,14 @@ class Post < ActiveResource::Base
40
40
  }
41
41
  end
42
42
  ```
43
-
44
43
  - Post admin config:
45
-
46
44
  ```rb
47
45
  ActiveAdmin.register Post do
48
- config.batch_actions = false
49
-
50
46
  filter :title_cont # Ransack postfixes required (_eq, _cont, etc.)
51
47
 
52
48
  controller do
53
49
  def permitted_params
54
- params.permit! # Just to make things easier :)
50
+ params.permit! # Permit all just for testing
55
51
  end
56
52
  end
57
53
 
@@ -65,21 +61,34 @@ ActiveAdmin.register Post do
65
61
  end
66
62
  end
67
63
  ```
64
+ - Ransack options [here](https://github.com/activerecord-hackery/ransack#search-matchers)
65
+ - Rails API index example with Ransack and Kaminari:
66
+ ```rb
67
+ after_action :set_pagination, only: [:index]
68
+
69
+ def index
70
+ per_page = params[:per_page].to_i
71
+ per_page = 15 if per_page < 1
72
+ @posts = Post.ransack( params[:q] ).result.order( params[:order] ).page( params[:page].to_i ).per( per_page )
73
+ end
74
+
75
+ def set_pagination
76
+ headers['Pagination-Limit'] = @posts.limit_value.to_s
77
+ headers['Pagination-Offset'] = @posts.offset_value.to_s
78
+ headers['Pagination-TotalCount'] = @posts.total_count.to_s
79
+ end
80
+ ```
68
81
 
69
82
  ## Notes
70
-
71
- If you create a new rails project don't use *--skip-active-record*
83
+ If you create a new rails project don't use *--skip-active-record*.
72
84
 
73
85
  ## Do you like it? Star it!
74
-
75
86
  If you use this component just star it. A developer is more motivated to improve a project when there is some interest.
76
87
 
77
- Take a look at [other ActiveAdmin components](https://github.com/blocknotes?utf8=✓&tab=repositories&q=activeadmin&type=source) that I made if you are curious.
88
+ Take a look at [other Active Admin components](https://github.com/blocknotes?utf8=✓&tab=repositories&q=activeadmin&type=source) if you are curious.
78
89
 
79
90
  ## Contributors
80
-
81
- - [Mattia Roccoberton](http://blocknot.es) - creator, maintainer
91
+ - [Mattia Roccoberton](http://blocknot.es): author
82
92
 
83
93
  ## License
84
-
85
- [MIT](LICENSE.txt)
94
+ The gem is available as open-source under the terms of the [MIT](LICENSE.txt).
data/Rakefile CHANGED
@@ -1,3 +1,3 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
- require "bundler/gem_tasks"
3
+ require 'bundler/gem_tasks'
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'activeadmin/active_resource/results'
2
4
  require 'activeadmin/active_resource/engine'
@@ -0,0 +1,136 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActiveAdmin
4
+ module ActiveResource
5
+ module Base
6
+ attr_writer :inheritance_column
7
+
8
+ # ref: https://api.rubyonrails.org/classes/ActiveRecord/AttributeMethods/ClassMethods.html#method-i-column_for_attribute
9
+ def column_for_attribute(name)
10
+ # => ActiveRecord::ConnectionAdapters::Column
11
+ col_name = name.to_s
12
+ send(:class).columns.find { |col| col.name == col_name }
13
+ end
14
+
15
+ module ClassMethods
16
+ prepend(FindExt = Module.new do
17
+ def find(*arguments)
18
+ # First argument an array -> batch action
19
+ if arguments.count > 0 && arguments[0].is_a?(Array)
20
+ ret = []
21
+ arguments[0].each do |id|
22
+ ret << find(id)
23
+ end
24
+ ret.compact
25
+ else
26
+ super
27
+ end
28
+ end
29
+ end)
30
+
31
+ def _ransackers
32
+ {}
33
+ end
34
+
35
+ # ref: https://api.rubyonrails.org/classes/ActiveRecord/ModelSchema/ClassMethods.html#method-i-content_columns
36
+ def content_columns
37
+ @content_columns ||= columns.reject do |c|
38
+ # c.name == primary_key || # required to update enities
39
+ c.name == inheritance_column ||
40
+ c.name.end_with?("_id") ||
41
+ c.name.end_with?("_count")
42
+ end
43
+ end
44
+
45
+ # ref: http://api.rubyonrails.org/classes/ActiveRecord/ModelSchema/ClassMethods.html#method-i-column_names
46
+ def column_names
47
+ @column_names ||= columns.map(&:name)
48
+ end
49
+
50
+ # ref: http://api.rubyonrails.org/classes/ActiveRecord/ModelSchema/ClassMethods.html#method-i-columns
51
+ def columns
52
+ # => array of ActiveRecord::ConnectionAdapters::Column
53
+ @columns ||= begin
54
+ schema.map do |name, type|
55
+ col_name = name.to_s
56
+ col_type = type.to_sym
57
+ col_type = :hidden if col_name == 'id'
58
+ OpenStruct.new(name: col_name, type: col_type)
59
+ end
60
+ end
61
+ end
62
+
63
+ def find_all(options = {})
64
+ prefix_options, query_options = split_options(options[:params])
65
+ query_options[:limit] = query_options[:per_page]
66
+ path = collection_path(prefix_options, query_options)
67
+ @connection_response = connection.get(path, headers)
68
+ instantiate_collection((format.decode( @connection_response.body ) || []), query_options, prefix_options)
69
+ end
70
+
71
+ # -> http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by
72
+ def find_by(arg, *_args)
73
+ arg && arg['id'] ? find(arg['id']) : find(:first, arg)
74
+ end
75
+
76
+ # -> http://api.rubyonrails.org/classes/ActiveRecord/ModelSchema/ClassMethods.html#method-i-inheritance_column
77
+ def inheritance_column
78
+ (@inheritance_column ||= nil) || 'type'
79
+ end
80
+
81
+ # -> http://api.rubyonrails.org/classes/ActiveRecord/ModelSchema/ClassMethods.html#method-i-quoted_table_name
82
+ def quoted_table_name
83
+ @quoted_table_name ||= "\"#{to_s.tableize}\""
84
+ end
85
+
86
+ def page(page)
87
+ @page = page.to_i
88
+ @page = 1 if @page < 1
89
+ self
90
+ end
91
+
92
+ def per(page_count)
93
+ @per_page = page_count.to_i
94
+ results
95
+ end
96
+
97
+ def ransack(params = {}, _options = {})
98
+ @ransack_params = params.blank? ? {} : params.permit!.to_h
99
+ OpenStruct.new(conditions: {}, object: OpenStruct.new(klass: self), result: self)
100
+ end
101
+
102
+ # -> http://api.rubyonrails.org/classes/ActiveRecord/Reflection/ClassMethods.html#method-i-reflect_on_all_associations
103
+ def reflect_on_all_associations(_macro = nil)
104
+ []
105
+ end
106
+
107
+ # -> http://api.rubyonrails.org/classes/ActiveRecord/QueryMethods.html#method-i-reorder
108
+ def reorder(sql)
109
+ @order = sql
110
+ self
111
+ end
112
+
113
+ def results
114
+ results = find_all params: { page: @page, per_page: @per_page, order: @order, q: @ransack_params }
115
+ decorate_with_pagination_data(results)
116
+ end
117
+
118
+ def decorate_with_pagination_data(results)
119
+ results.current_page = @page
120
+ results.limit_value = (@connection_response['pagination-limit'] || @per_page).to_i
121
+ results.total_count = (@connection_response['pagination-totalcount'] || results.count).to_i
122
+ results.total_pages = results.limit_value > 0 ? (results.total_count.to_f / results.limit_value).ceil : 1
123
+ results
124
+ end
125
+ end
126
+
127
+ def self.prepended(base)
128
+ base.collection_parser = ActiveAdmin::ActiveResource::Results
129
+
130
+ class << base
131
+ prepend ClassMethods
132
+ end
133
+ end
134
+ end
135
+ end
136
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActiveAdmin
4
+ module ActiveResource
5
+ module Connection
6
+ # ref: https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/Quoting.html#method-i-quote_column_name
7
+ def quote_column_name(column_name)
8
+ column_name.to_s
9
+ end
10
+ end
11
+ end
12
+ end
@@ -1,4 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'active_admin'
4
+ require_relative 'base'
5
+ require_relative 'connection'
2
6
 
3
7
  module ActiveAdmin
4
8
  module ActiveResource
@@ -9,100 +13,9 @@ module ActiveAdmin
9
13
  end
10
14
 
11
15
  ::ActiveResource::Base.class_eval do
12
- attr_writer :inheritance_column
13
-
14
- self.collection_parser = ActiveAdmin::ActiveResource::Results
15
-
16
- class << self
17
- def _ransackers
18
- {}
19
- end
20
-
21
- # -> http://api.rubyonrails.org/classes/ActiveRecord/ModelSchema/ClassMethods.html#method-i-column_names
22
- def column_names
23
- @column_names ||= columns.map(&:name)
24
- end
25
-
26
- # -> http://api.rubyonrails.org/classes/ActiveRecord/ModelSchema/ClassMethods.html#method-i-columns
27
- def columns
28
- @columns ||= self.known_attributes.map { |col| OpenStruct.new( name: col ) }
29
- end
30
-
31
- # -> http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaCache.html#method-i-columns_hash
32
- # def columns_hash
33
- # # { 'title' => OpenStruct.new( type: :string ) }
34
- # {}
35
- # end
36
-
37
- def find_all( options = {} )
38
- prefix_options, query_options = split_options(options[:params])
39
- path = collection_path(prefix_options, query_options)
40
- @connection_response = connection.get(path, headers)
41
- instantiate_collection( (format.decode( @connection_response.body ) || []), query_options, prefix_options )
42
- end
43
-
44
- # -> http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by
45
- def find_by( arg, *args )
46
- arg && arg['id'] ? self.find( arg['id'] ) : self.find( :first, arg )
47
- end
48
-
49
- # -> http://api.rubyonrails.org/classes/ActiveRecord/ModelSchema/ClassMethods.html#method-i-inheritance_column
50
- def inheritance_column
51
- ( @inheritance_column ||= nil ) || 'type'
52
- end
53
-
54
- # -> http://api.rubyonrails.org/classes/ActiveRecord/ModelSchema/ClassMethods.html#method-i-quoted_table_name
55
- def quoted_table_name
56
- @quoted_table_name ||= "\"#{self.to_s.tableize}\""
57
- end
58
-
59
- def page( page )
60
- @page = page.to_i
61
- @page = 1 if @page < 1
62
- # results = find_all params: {page: page, per_page: 10, order: @order}
63
- # results.current_page = page ? page.to_i : 1
64
- # results.limit_value = @connection_response['pagination-limit'].to_i
65
- # results.total_count = @connection_response['pagination-totalcount'].to_i
66
- # results.total_pages = ( results.total_count.to_f / results.limit_value ).ceil
67
- # results
68
- self
69
- end
70
-
71
- def per( page_count )
72
- @page_count = page_count.to_i
73
- # self
74
- results
75
- end
76
-
77
- def ransack( params = {}, options = {} )
78
- @ransack_params = params.blank? ? {} : params.permit!.to_h
79
- OpenStruct.new( conditions: {}, object: OpenStruct.new( klass: self ), result: self )
80
- end
81
-
82
- # -> http://api.rubyonrails.org/classes/ActiveRecord/Reflection/ClassMethods.html#method-i-reflect_on_all_associations
83
- def reflect_on_all_associations( macro = nil )
84
- []
85
- end
86
-
87
- # -> http://api.rubyonrails.org/classes/ActiveRecord/QueryMethods.html#method-i-reorder
88
- def reorder( sql )
89
- @order = sql
90
- self
91
- end
92
-
93
- def results
94
- results = find_all params: {page: @page, per_page: @page_count, order: @order, q: @ransack_params}
95
- results.current_page = @page
96
- results.limit_value = @connection_response['pagination-limit'].to_i
97
- results.total_count = @connection_response['pagination-totalcount'].to_i
98
- results.total_pages = ( results.total_count.to_f / results.limit_value ).ceil
99
- results
100
- end
101
- end
16
+ prepend ActiveAdmin::ActiveResource::Base
102
17
  end
103
18
 
104
19
  ::ActiveResource::Connection.class_eval do
105
- def quote_column_name( column_name )
106
- column_name
107
- end
20
+ prepend ActiveAdmin::ActiveResource::Connection
108
21
  end
@@ -1,9 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActiveAdmin
2
4
  module ActiveResource
3
5
  class Results < ::ActiveResource::Collection
4
6
  attr_accessor :current_page, :limit_value, :total_count, :total_pages
5
7
 
6
- def initialize( elements = [] )
8
+ def initialize(elements = [])
7
9
  super elements
8
10
  @limit_value = ActiveAdmin.application.default_per_page
9
11
  @total_count = 0
@@ -11,7 +13,7 @@ module ActiveAdmin
11
13
  @current_page = 1
12
14
  end
13
15
 
14
- def except( *params )
16
+ def except(*_params)
15
17
  self
16
18
  end
17
19
 
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActiveAdmin
2
4
  module ActiveResource
3
- VERSION = '0.1.1'
5
+ VERSION = '0.2.6'
4
6
  end
5
7
  end
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'active_resource'
2
4
  require 'activeadmin/active_resource'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin_active_resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mattia Roccoberton
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-03 00:00:00.000000000 Z
11
+ date: 2020-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeadmin
@@ -16,41 +16,194 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.0'
19
+ version: '2.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
- version: '1.0'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activeresource
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '5.0'
33
+ version: 5.1.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
- version: '5.0'
40
+ version: 5.1.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: activestorage
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 6.0.3.2
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 6.0.3.2
55
+ - !ruby/object:Gem::Dependency
56
+ name: capybara
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 3.33.0
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 3.33.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: pry
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.13.1
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.13.1
83
+ - !ruby/object:Gem::Dependency
84
+ name: puma
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 4.3.5
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 4.3.5
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec_junit_formatter
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 0.4.1
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 0.4.1
111
+ - !ruby/object:Gem::Dependency
112
+ name: rspec-rails
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 4.0.1
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 4.0.1
125
+ - !ruby/object:Gem::Dependency
126
+ name: rubocop
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 0.90.0
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 0.90.0
139
+ - !ruby/object:Gem::Dependency
140
+ name: selenium-webdriver
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: 3.142.7
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: 3.142.7
153
+ - !ruby/object:Gem::Dependency
154
+ name: sqlite3
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: 1.4.2
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: 1.4.2
167
+ - !ruby/object:Gem::Dependency
168
+ name: vcr
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: 6.0.0
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: 6.0.0
181
+ - !ruby/object:Gem::Dependency
182
+ name: webmock
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: 3.9.2
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: 3.9.2
41
195
  description: An Active Admin plugin to use Active Resource
42
196
  email: mat@blocknot.es
43
197
  executables: []
44
198
  extensions: []
45
199
  extra_rdoc_files: []
46
200
  files:
47
- - ".gitignore"
48
- - Gemfile
49
201
  - LICENSE.txt
50
202
  - README.md
51
203
  - Rakefile
52
- - activeadmin_active_resource.gemspec
53
204
  - lib/activeadmin/active_resource.rb
205
+ - lib/activeadmin/active_resource/base.rb
206
+ - lib/activeadmin/active_resource/connection.rb
54
207
  - lib/activeadmin/active_resource/engine.rb
55
208
  - lib/activeadmin/active_resource/results.rb
56
209
  - lib/activeadmin/active_resource/version.rb
@@ -59,7 +212,7 @@ homepage: https://github.com/blocknotes/activeadmin_active_resource
59
212
  licenses:
60
213
  - MIT
61
214
  metadata: {}
62
- post_install_message:
215
+ post_install_message:
63
216
  rdoc_options: []
64
217
  require_paths:
65
218
  - lib
@@ -74,9 +227,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
227
  - !ruby/object:Gem::Version
75
228
  version: '0'
76
229
  requirements: []
77
- rubyforge_project:
78
- rubygems_version: 2.6.14
79
- signing_key:
230
+ rubygems_version: 3.0.3
231
+ signing_key:
80
232
  specification_version: 4
81
233
  summary: Active Resource for ActiveAdmin
82
234
  test_files: []
data/.gitignore DELETED
@@ -1,3 +0,0 @@
1
- _misc/
2
- Gemfile.lock
3
- *.orig
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
@@ -1,20 +0,0 @@
1
- lib = File.expand_path('../lib', __FILE__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require 'activeadmin/active_resource/version'
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = 'activeadmin_active_resource'
7
- spec.version = ActiveAdmin::ActiveResource::VERSION
8
- spec.summary = 'Active Resource for ActiveAdmin'
9
- spec.description = 'An Active Admin plugin to use Active Resource'
10
- spec.license = 'MIT'
11
- spec.authors = ['Mattia Roccoberton']
12
- spec.email = 'mat@blocknot.es'
13
- spec.homepage = 'https://github.com/blocknotes/activeadmin_active_resource'
14
-
15
- spec.files = `git ls-files -z`.split("\x0")
16
- spec.require_paths = ['lib']
17
-
18
- spec.add_runtime_dependency 'activeadmin', '~> 1.0'
19
- spec.add_runtime_dependency 'activeresource', '~> 5.0'
20
- end