adminpanel 1.2.9 → 1.2.10
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/adminpanel.gemspec +1 -0
- data/app/controllers/adminpanel/analytics_controller.rb +1 -1
- data/app/controllers/adminpanel/application_controller.rb +6 -6
- data/app/controllers/adminpanel/categories_controller.rb +17 -8
- data/app/controllers/adminpanel/galleries_controller.rb +2 -0
- data/app/controllers/adminpanel/sections_controller.rb +2 -0
- data/app/controllers/adminpanel/sessions_controller.rb +2 -2
- data/app/controllers/adminpanel/users_controller.rb +2 -0
- data/app/helpers/adminpanel/custom_form_builder.rb +24 -0
- data/app/helpers/adminpanel/rest_actions_helper.rb +26 -9
- data/app/helpers/adminpanel/shared_pages_helper.rb +2 -1
- data/app/models/adminpanel/group.rb +6 -0
- data/app/models/adminpanel/user.rb +48 -5
- data/app/views/adminpanel/categories/_categories_table.html.erb +3 -2
- data/app/views/adminpanel/categories/_category_form.html.erb +4 -4
- data/app/views/adminpanel/categories/create.js.erb +2 -1
- data/app/views/adminpanel/categories/index.html.erb +1 -1
- data/app/views/adminpanel/categories/new.js.erb +2 -1
- data/app/views/layouts/_side_menu.html.erb +20 -18
- data/app/views/layouts/_top_bar.html.erb +1 -1
- data/app/views/shared/_form_fields.html.erb +57 -5
- data/app/views/shared/_modal.html.erb +8 -0
- data/app/views/shared/_remote_form_fields.html.erb +12 -0
- data/app/views/shared/create_belongs_to.js.erb +5 -0
- data/app/views/shared/create_has_many.js.erb +5 -0
- data/app/views/shared/edit.html.erb +1 -0
- data/app/views/shared/new.html.erb +15 -4
- data/app/views/shared/new.js.erb +2 -0
- data/config/locales/es.yml +5 -3
- data/lib/adminpanel.rb +1 -0
- data/lib/adminpanel/active_record/adminpanel_extension.rb +0 -4
- data/lib/adminpanel/version.rb +1 -1
- data/lib/generators/adminpanel/initialize/initialize_generator.rb +11 -0
- data/lib/generators/adminpanel/initialize/templates/ability.rb +31 -0
- data/lib/generators/adminpanel/initialize/templates/adminpanel_setup.rb +7 -7
- data/lib/generators/adminpanel/initialize/templates/create_adminpanel_tables.rb +9 -1
- data/lib/tasks/adminpanel/adminpanel.rake +2 -1
- data/spec/dummy/app/models/ability.rb +31 -0
- data/spec/dummy/app/models/adminpanel/category.rb +4 -1
- data/spec/features/authentication_pages_spec.rb +6 -5
- data/spec/features/galleries_pages_spec.rb +3 -1
- data/spec/features/section_pages_spec.rb +2 -1
- data/spec/features/shared_pages_spec.rb +66 -22
- data/spec/generators/gallery_generator_spec.rb +3 -3
- data/spec/generators/resource_generator_spec.rb +3 -3
- data/spec/models/gallery_spec.rb +3 -1
- data/spec/models/section_spec.rb +12 -11
- data/spec/models/user_spec.rb +6 -2
- data/spec/spec_helper.rb +5 -2
- data/spec/support/define_factory_models.rb +6 -0
- data/spec/support/helper_methods.rb +2 -1
- data/spec/support/test_database.rb +7 -0
- data/spec/tasks/adminpanel_rake_spec.rb +1 -0
- metadata +53 -32
- data/spec/dummy/app/controllers/adminpanel/categories_controller.rb +0 -4
- data/spec/models/product_spec.rb +0 -39
@@ -1,7 +1,8 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
+
require 'support/test_database'
|
2
3
|
|
3
4
|
describe 'shared pages' do
|
4
|
-
subject {page}
|
5
|
+
subject { page }
|
5
6
|
|
6
7
|
let(:user) { Factory(:user) }
|
7
8
|
before do
|
@@ -21,33 +22,76 @@ describe 'shared pages' do
|
|
21
22
|
it { should have_link('i', adminpanel.edit_product_path(product)) }
|
22
23
|
end
|
23
24
|
|
24
|
-
|
25
|
-
let(:category){ Factory(:category) }
|
26
|
-
before do
|
27
|
-
category.id = 1 #to force instantiation and id.
|
28
|
-
visit adminpanel.new_product_path
|
29
|
-
end
|
30
|
-
|
31
|
-
it { should have_title(I18n.t("action.create") + " " + Adminpanel::Product.display_name) }
|
25
|
+
context 'product' do
|
32
26
|
|
33
|
-
describe
|
34
|
-
|
27
|
+
describe 'new' do
|
28
|
+
let(:category){ Factory(:category) }
|
29
|
+
before do
|
30
|
+
category.id = 1 #to force instantiation and id.
|
31
|
+
visit adminpanel.new_product_path
|
32
|
+
end
|
35
33
|
|
36
34
|
it { should have_title(I18n.t("action.create") + " " + Adminpanel::Product.display_name) }
|
37
|
-
it { should have_selector("div#alerts") }
|
38
|
-
end
|
39
35
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
36
|
+
it 'should have add remote category button' do
|
37
|
+
should have_selector(
|
38
|
+
'a.btn-info',
|
39
|
+
:text => I18n.t(
|
40
|
+
'other.add',
|
41
|
+
:model => Adminpanel::Category.display_name
|
42
|
+
)
|
43
|
+
)
|
47
44
|
end
|
48
45
|
|
49
|
-
|
50
|
-
|
46
|
+
describe 'submtting with invalid information' do
|
47
|
+
before do
|
48
|
+
find("form#new_resource").submit_form!
|
49
|
+
end
|
50
|
+
|
51
|
+
it { should have_title(I18n.t("action.create") + " " + Adminpanel::Product.display_name) }
|
52
|
+
it { should have_selector("div#alerts") }
|
53
|
+
end
|
54
|
+
|
55
|
+
# describe 'opening the remote form modal' do
|
56
|
+
# before do
|
57
|
+
# page.find("a##{Adminpanel::Category.name.demodulize.downcase}-modal-link").click
|
58
|
+
# end
|
59
|
+
#
|
60
|
+
# it 'should have modal with correct #modal-title' do
|
61
|
+
# page.should have_selector(
|
62
|
+
# :css,
|
63
|
+
# 'h3#modal-title',
|
64
|
+
# :content => I18n.t('other.add', :model => Adminpanel::Category.display_name)
|
65
|
+
# )
|
66
|
+
# end
|
67
|
+
#
|
68
|
+
# it 'should have the modal with the correct fields' do
|
69
|
+
# should have_selector("input#category_name")
|
70
|
+
# end
|
71
|
+
|
72
|
+
# describe 'sending the resource remotely with invalid information' do
|
73
|
+
# before do
|
74
|
+
# find('#new-Category-button').click
|
75
|
+
# end
|
76
|
+
# it 'should display error message' do
|
77
|
+
# page.should have_selector("div#alerts")
|
78
|
+
# end
|
79
|
+
# end
|
80
|
+
|
81
|
+
# end
|
82
|
+
|
83
|
+
describe 'submitting with valid information' do
|
84
|
+
before do
|
85
|
+
fill_in "product_name", :with => "product name"
|
86
|
+
fill_in "product_price", :with => "855.5"
|
87
|
+
find(:css, "#product_category_ids_[value='1']").set(true)
|
88
|
+
find(:xpath, "//input[@id='description-field']").set "<p>a little longer text</p>"
|
89
|
+
find("form#new_resource").submit_form!
|
90
|
+
end
|
91
|
+
|
92
|
+
it { should have_content(I18n.t("action.save_success"))}
|
93
|
+
it { Adminpanel::Categorization.count.should equal(1)}
|
94
|
+
end
|
51
95
|
end
|
52
96
|
end
|
53
97
|
|
@@ -8,9 +8,9 @@ describe Adminpanel::Generators::GalleryGenerator do
|
|
8
8
|
Rails::Generators.options[:rails][:orm] = :active_record
|
9
9
|
end
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
after do
|
12
|
+
prepare_destination
|
13
|
+
end
|
14
14
|
|
15
15
|
describe 'with "product" as argument' do
|
16
16
|
before do
|
@@ -9,9 +9,9 @@ describe Adminpanel::Generators::ResourceGenerator do
|
|
9
9
|
Rails::Generators.options[:rails][:orm] = :active_record
|
10
10
|
end
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
after do
|
13
|
+
prepare_destination
|
14
|
+
end
|
15
15
|
|
16
16
|
describe 'with arguments %w(post name description:wysiwyg number:float
|
17
17
|
quantity:integer date:datepicker photo:images)' do
|
data/spec/models/gallery_spec.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
+
require 'support/test_database'
|
3
|
+
|
2
4
|
|
3
5
|
describe Adminpanel::Gallery do
|
4
6
|
before do
|
@@ -19,4 +21,4 @@ describe Adminpanel::Gallery do
|
|
19
21
|
describe "default scope" do
|
20
22
|
it { expect(Adminpanel::Gallery.scoped.to_sql).to eq Adminpanel::Gallery.reorder('').order('position ASC').to_sql}
|
21
23
|
end
|
22
|
-
end
|
24
|
+
end
|
data/spec/models/section_spec.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
+
require 'support/test_database'
|
2
3
|
|
3
4
|
describe Adminpanel::Section do
|
4
5
|
before do
|
@@ -15,27 +16,27 @@ describe Adminpanel::Section do
|
|
15
16
|
subject { @section }
|
16
17
|
|
17
18
|
it { should respond_to(:description) }
|
18
|
-
it { should respond_to(:has_image) }
|
19
|
+
it { should respond_to(:has_image) }
|
19
20
|
it { should respond_to(:key) }
|
20
21
|
it { should respond_to(:name) }
|
21
|
-
it { should respond_to(:has_description) }
|
22
|
-
it { should respond_to(:page) }
|
22
|
+
it { should respond_to(:has_description) }
|
23
|
+
it { should respond_to(:page) }
|
23
24
|
|
24
25
|
describe "when key is telephone and has less than 10 chars" do
|
25
|
-
before do
|
26
|
+
before do
|
26
27
|
@section.key = "telephone"
|
27
28
|
@section.description = "1" * 9
|
28
29
|
end
|
29
30
|
it { @section.valid? eq false}
|
30
|
-
end
|
31
|
+
end
|
31
32
|
|
32
33
|
describe "when key is telephone and has more than 10 chars" do
|
33
|
-
before do
|
34
|
+
before do
|
34
35
|
@section.key = "telephone"
|
35
36
|
@section.description = "1" * 11
|
36
37
|
end
|
37
38
|
it { @section.valid? eq false}
|
38
|
-
end
|
39
|
+
end
|
39
40
|
|
40
41
|
describe "when key is telephone and has 10 chars" do
|
41
42
|
before do
|
@@ -44,17 +45,17 @@ describe Adminpanel::Section do
|
|
44
45
|
end
|
45
46
|
it { @section.valid? eq true}
|
46
47
|
|
47
|
-
end
|
48
|
+
end
|
48
49
|
|
49
50
|
describe "when key is blank" do
|
50
51
|
before {@section.key = " "}
|
51
52
|
it { @section.valid? eq false}
|
52
|
-
end
|
53
|
+
end
|
53
54
|
|
54
55
|
describe "when name is blank" do
|
55
56
|
before {@section.name = " "}
|
56
57
|
it { @section.valid? eq false}
|
57
|
-
end
|
58
|
+
end
|
58
59
|
|
59
60
|
describe "when description is blank" do
|
60
61
|
before {@section.description = " "}
|
@@ -64,4 +65,4 @@ describe Adminpanel::Section do
|
|
64
65
|
describe "default scope" do
|
65
66
|
it { expect(Adminpanel::Section.scoped.to_sql).to eq Adminpanel::Section.reorder('').order('page ASC').to_sql}
|
66
67
|
end
|
67
|
-
end
|
68
|
+
end
|
data/spec/models/user_spec.rb
CHANGED
@@ -1,13 +1,16 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
+
require 'support/test_database'
|
2
3
|
|
3
|
-
describe Adminpanel::User do
|
4
4
|
|
5
|
+
describe Adminpanel::User do
|
6
|
+
let(:group) { Factory(:group) }
|
5
7
|
before do
|
6
8
|
@user = Adminpanel::User.new(
|
7
9
|
:name => "Example User",
|
8
10
|
:email => "user@example.com",
|
9
11
|
:password => "foobar",
|
10
|
-
:password_confirmation => "foobar"
|
12
|
+
:password_confirmation => "foobar",
|
13
|
+
:group_id => group.object_id
|
11
14
|
)
|
12
15
|
end
|
13
16
|
|
@@ -15,6 +18,7 @@ describe Adminpanel::User do
|
|
15
18
|
|
16
19
|
it { should respond_to(:name) }
|
17
20
|
it { should respond_to(:email) }
|
21
|
+
it { should respond_to(:group_id) }
|
18
22
|
it { should respond_to(:password_digest) }
|
19
23
|
it { should respond_to(:password) }
|
20
24
|
it { should respond_to(:password_confirmation) }
|
data/spec/spec_helper.rb
CHANGED
@@ -8,24 +8,27 @@
|
|
8
8
|
ENV["RAILS_ENV"] ||= 'test'
|
9
9
|
require File.expand_path("../dummy/config/environment", __FILE__)
|
10
10
|
require "rspec/rails"
|
11
|
+
require "capybara/rspec"
|
11
12
|
require "factory_girl"
|
12
13
|
require "carrierwave/test/matchers"
|
13
14
|
require "active_record"
|
14
15
|
require "rake"
|
15
16
|
|
16
|
-
Dir["./spec/support/**/*.rb"].sort.each {|f| require f}
|
17
|
+
Dir["./spec/support/**/*.rb"].sort.each { |f| require f }
|
17
18
|
|
18
19
|
RSpec.configure do |config|
|
19
20
|
config.treat_symbols_as_metadata_keys_with_true_values = true
|
20
21
|
config.run_all_when_everything_filtered = true
|
21
22
|
config.filter_run :focus
|
22
23
|
|
23
|
-
root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
24
|
+
# root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
24
25
|
ActiveRecord::Base.establish_connection(
|
25
26
|
:adapter => 'sqlite3',
|
26
27
|
:database => ':memory:'
|
27
28
|
)
|
28
29
|
|
30
|
+
config.use_transactional_fixtures = false
|
31
|
+
|
29
32
|
config.include Rails.application.routes.url_helpers
|
30
33
|
|
31
34
|
config.order = 'random'
|
@@ -5,6 +5,11 @@ Factory.define :user, :class => Adminpanel::User do |user|
|
|
5
5
|
user.email "email@test.com"
|
6
6
|
user.password "123456"
|
7
7
|
user.password_confirmation "123456"
|
8
|
+
user.group_id '1'
|
9
|
+
end
|
10
|
+
|
11
|
+
Factory.define :group, :class => Adminpanel::Group do |group|
|
12
|
+
group.name 'Admin'
|
8
13
|
end
|
9
14
|
|
10
15
|
Factory.define :gallery, :class => Adminpanel::Gallery do |gallery|
|
@@ -23,6 +28,7 @@ end
|
|
23
28
|
|
24
29
|
Factory.define :category, :class => Adminpanel::Category do |category|
|
25
30
|
category.name "Test Category"
|
31
|
+
category.model "Product"
|
26
32
|
end
|
27
33
|
|
28
34
|
Factory.define :photo, :class => Adminpanel::Photo do |photo|
|
@@ -1,4 +1,5 @@
|
|
1
1
|
def valid_signin(user)
|
2
|
+
Factory(:group)
|
2
3
|
fill_in "inputEmail", :with => user.email
|
3
4
|
fill_in "inputPassword", :with => user.password
|
4
5
|
click_button "signin-button"
|
@@ -24,4 +25,4 @@ RSpec::Matchers.define(:have_image) do |src|
|
|
24
25
|
failure_message_for_should_not do
|
25
26
|
"Found image with src #{src.inspect}!"
|
26
27
|
end
|
27
|
-
end
|
28
|
+
end
|
@@ -3,6 +3,7 @@ ActiveRecord::Migration.create_table :adminpanel_users do |t|
|
|
3
3
|
t.string :email
|
4
4
|
t.string :password_digest
|
5
5
|
t.string :remember_token
|
6
|
+
t.integer :group_id
|
6
7
|
t.datetime :created_at, :null => false
|
7
8
|
t.datetime :updated_at, :null => false
|
8
9
|
end
|
@@ -33,6 +34,7 @@ ActiveRecord::Migration.create_table :adminpanel_photos do |t|
|
|
33
34
|
end
|
34
35
|
ActiveRecord::Migration.create_table :adminpanel_categories do |t|
|
35
36
|
t.string :name
|
37
|
+
t.string :model
|
36
38
|
t.datetime :created_at, :null => false
|
37
39
|
t.datetime :updated_at, :null => false
|
38
40
|
end
|
@@ -42,6 +44,11 @@ ActiveRecord::Migration.create_table :adminpanel_categorizations do |t|
|
|
42
44
|
t.datetime :created_at, :null => false
|
43
45
|
t.datetime :updated_at, :null => false
|
44
46
|
end
|
47
|
+
ActiveRecord::Migration.create_table :adminpanel_groups do |t|
|
48
|
+
t.string :name
|
49
|
+
t.datetime :created_at, :null => false
|
50
|
+
t.datetime :updated_at, :null => false
|
51
|
+
end
|
45
52
|
ActiveRecord::Migration.create_table :adminpanel_sections do |t|
|
46
53
|
t.string :name
|
47
54
|
t.text :description
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adminpanel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 1.2.
|
9
|
+
- 10
|
10
|
+
version: 1.2.10
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jose Ramon Camacho
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2014-
|
19
|
+
date: 2014-04-10 00:00:00 -05:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -132,9 +132,25 @@ dependencies:
|
|
132
132
|
type: :runtime
|
133
133
|
version_requirements: *id007
|
134
134
|
- !ruby/object:Gem::Dependency
|
135
|
-
name:
|
135
|
+
name: cancan
|
136
136
|
prerelease: false
|
137
137
|
requirement: &id008 !ruby/object:Gem::Requirement
|
138
|
+
none: false
|
139
|
+
requirements:
|
140
|
+
- - ~>
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
hash: 27
|
143
|
+
segments:
|
144
|
+
- 1
|
145
|
+
- 6
|
146
|
+
- 10
|
147
|
+
version: 1.6.10
|
148
|
+
type: :runtime
|
149
|
+
version_requirements: *id008
|
150
|
+
- !ruby/object:Gem::Dependency
|
151
|
+
name: google-api-client
|
152
|
+
prerelease: false
|
153
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
138
154
|
none: false
|
139
155
|
requirements:
|
140
156
|
- - ~>
|
@@ -146,11 +162,11 @@ dependencies:
|
|
146
162
|
- 1
|
147
163
|
version: 0.7.1
|
148
164
|
type: :runtime
|
149
|
-
version_requirements: *
|
165
|
+
version_requirements: *id009
|
150
166
|
- !ruby/object:Gem::Dependency
|
151
167
|
name: bundler
|
152
168
|
prerelease: false
|
153
|
-
requirement: &
|
169
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
154
170
|
none: false
|
155
171
|
requirements:
|
156
172
|
- - ~>
|
@@ -161,11 +177,11 @@ dependencies:
|
|
161
177
|
- 3
|
162
178
|
version: "1.3"
|
163
179
|
type: :development
|
164
|
-
version_requirements: *
|
180
|
+
version_requirements: *id010
|
165
181
|
- !ruby/object:Gem::Dependency
|
166
182
|
name: activerecord
|
167
183
|
prerelease: false
|
168
|
-
requirement: &
|
184
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
169
185
|
none: false
|
170
186
|
requirements:
|
171
187
|
- - ~>
|
@@ -177,11 +193,11 @@ dependencies:
|
|
177
193
|
- 12
|
178
194
|
version: 3.2.12
|
179
195
|
type: :development
|
180
|
-
version_requirements: *
|
196
|
+
version_requirements: *id011
|
181
197
|
- !ruby/object:Gem::Dependency
|
182
198
|
name: rake
|
183
199
|
prerelease: false
|
184
|
-
requirement: &
|
200
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
185
201
|
none: false
|
186
202
|
requirements:
|
187
203
|
- - "="
|
@@ -193,11 +209,11 @@ dependencies:
|
|
193
209
|
- 1
|
194
210
|
version: 10.1.1
|
195
211
|
type: :development
|
196
|
-
version_requirements: *
|
212
|
+
version_requirements: *id012
|
197
213
|
- !ruby/object:Gem::Dependency
|
198
214
|
name: sqlite3
|
199
215
|
prerelease: false
|
200
|
-
requirement: &
|
216
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
201
217
|
none: false
|
202
218
|
requirements:
|
203
219
|
- - ">="
|
@@ -207,11 +223,11 @@ dependencies:
|
|
207
223
|
- 0
|
208
224
|
version: "0"
|
209
225
|
type: :development
|
210
|
-
version_requirements: *
|
226
|
+
version_requirements: *id013
|
211
227
|
- !ruby/object:Gem::Dependency
|
212
228
|
name: factory_girl
|
213
229
|
prerelease: false
|
214
|
-
requirement: &
|
230
|
+
requirement: &id014 !ruby/object:Gem::Requirement
|
215
231
|
none: false
|
216
232
|
requirements:
|
217
233
|
- - "="
|
@@ -223,11 +239,11 @@ dependencies:
|
|
223
239
|
- 4
|
224
240
|
version: 2.6.4
|
225
241
|
type: :development
|
226
|
-
version_requirements: *
|
242
|
+
version_requirements: *id014
|
227
243
|
- !ruby/object:Gem::Dependency
|
228
244
|
name: rspec
|
229
245
|
prerelease: false
|
230
|
-
requirement: &
|
246
|
+
requirement: &id015 !ruby/object:Gem::Requirement
|
231
247
|
none: false
|
232
248
|
requirements:
|
233
249
|
- - ~>
|
@@ -239,11 +255,11 @@ dependencies:
|
|
239
255
|
- 0
|
240
256
|
version: 2.14.0
|
241
257
|
type: :development
|
242
|
-
version_requirements: *
|
258
|
+
version_requirements: *id015
|
243
259
|
- !ruby/object:Gem::Dependency
|
244
260
|
name: rspec-rails
|
245
261
|
prerelease: false
|
246
|
-
requirement: &
|
262
|
+
requirement: &id016 !ruby/object:Gem::Requirement
|
247
263
|
none: false
|
248
264
|
requirements:
|
249
265
|
- - ~>
|
@@ -255,11 +271,11 @@ dependencies:
|
|
255
271
|
- 0
|
256
272
|
version: 2.14.0
|
257
273
|
type: :development
|
258
|
-
version_requirements: *
|
274
|
+
version_requirements: *id016
|
259
275
|
- !ruby/object:Gem::Dependency
|
260
276
|
name: capybara
|
261
277
|
prerelease: false
|
262
|
-
requirement: &
|
278
|
+
requirement: &id017 !ruby/object:Gem::Requirement
|
263
279
|
none: false
|
264
280
|
requirements:
|
265
281
|
- - "="
|
@@ -271,11 +287,11 @@ dependencies:
|
|
271
287
|
- 4
|
272
288
|
version: 1.1.4
|
273
289
|
type: :development
|
274
|
-
version_requirements: *
|
290
|
+
version_requirements: *id017
|
275
291
|
- !ruby/object:Gem::Dependency
|
276
292
|
name: nokogiri
|
277
293
|
prerelease: false
|
278
|
-
requirement: &
|
294
|
+
requirement: &id018 !ruby/object:Gem::Requirement
|
279
295
|
none: false
|
280
296
|
requirements:
|
281
297
|
- - "="
|
@@ -287,11 +303,11 @@ dependencies:
|
|
287
303
|
- 9
|
288
304
|
version: 1.5.9
|
289
305
|
type: :development
|
290
|
-
version_requirements: *
|
306
|
+
version_requirements: *id018
|
291
307
|
- !ruby/object:Gem::Dependency
|
292
308
|
name: rubyzip
|
293
309
|
prerelease: false
|
294
|
-
requirement: &
|
310
|
+
requirement: &id019 !ruby/object:Gem::Requirement
|
295
311
|
none: false
|
296
312
|
requirements:
|
297
313
|
- - "="
|
@@ -303,11 +319,11 @@ dependencies:
|
|
303
319
|
- 9
|
304
320
|
version: 0.9.9
|
305
321
|
type: :development
|
306
|
-
version_requirements: *
|
322
|
+
version_requirements: *id019
|
307
323
|
- !ruby/object:Gem::Dependency
|
308
324
|
name: ammeter
|
309
325
|
prerelease: false
|
310
|
-
requirement: &
|
326
|
+
requirement: &id020 !ruby/object:Gem::Requirement
|
311
327
|
none: false
|
312
328
|
requirements:
|
313
329
|
- - "="
|
@@ -319,7 +335,7 @@ dependencies:
|
|
319
335
|
- 9
|
320
336
|
version: 0.2.9
|
321
337
|
type: :development
|
322
|
-
version_requirements: *
|
338
|
+
version_requirements: *id020
|
323
339
|
description: Gem that makes the admin panel for a site a breeze!
|
324
340
|
email:
|
325
341
|
- joserracamacho@gmail.com
|
@@ -428,6 +444,7 @@ files:
|
|
428
444
|
- app/helpers/adminpanel/shared_pages_helper.rb
|
429
445
|
- app/models/adminpanel/analytic.rb
|
430
446
|
- app/models/adminpanel/gallery.rb
|
447
|
+
- app/models/adminpanel/group.rb
|
431
448
|
- app/models/adminpanel/image.rb
|
432
449
|
- app/models/adminpanel/section.rb
|
433
450
|
- app/models/adminpanel/user.rb
|
@@ -467,10 +484,15 @@ files:
|
|
467
484
|
- app/views/shared/_gallery_entries.html.erb
|
468
485
|
- app/views/shared/_image_fields.html.erb
|
469
486
|
- app/views/shared/_init_editor.html.erb
|
487
|
+
- app/views/shared/_modal.html.erb
|
488
|
+
- app/views/shared/_remote_form_fields.html.erb
|
489
|
+
- app/views/shared/create_belongs_to.js.erb
|
490
|
+
- app/views/shared/create_has_many.js.erb
|
470
491
|
- app/views/shared/edit.html.erb
|
471
492
|
- app/views/shared/gallery_entries.js.erb
|
472
493
|
- app/views/shared/index.html.erb
|
473
494
|
- app/views/shared/new.html.erb
|
495
|
+
- app/views/shared/new.js.erb
|
474
496
|
- app/views/shared/show.html.erb
|
475
497
|
- config/locales/es.yml
|
476
498
|
- config/routes.rb
|
@@ -483,6 +505,7 @@ files:
|
|
483
505
|
- lib/generators/adminpanel/gallery/templates/gallery_template.rb
|
484
506
|
- lib/generators/adminpanel/gallery/templates/uploader.rb
|
485
507
|
- lib/generators/adminpanel/initialize/initialize_generator.rb
|
508
|
+
- lib/generators/adminpanel/initialize/templates/ability.rb
|
486
509
|
- lib/generators/adminpanel/initialize/templates/adminpanel_setup.rb
|
487
510
|
- lib/generators/adminpanel/initialize/templates/category_template.rb
|
488
511
|
- lib/generators/adminpanel/initialize/templates/create_adminpanel_categories_table.rb
|
@@ -501,12 +524,12 @@ files:
|
|
501
524
|
- spec/dummy/app/assets/javascripts/application.js
|
502
525
|
- spec/dummy/app/assets/stylesheets/application.css
|
503
526
|
- spec/dummy/app/controllers/adminpanel/.gitkeep
|
504
|
-
- spec/dummy/app/controllers/adminpanel/categories_controller.rb
|
505
527
|
- spec/dummy/app/controllers/adminpanel/products_controller.rb
|
506
528
|
- spec/dummy/app/controllers/application_controller.rb
|
507
529
|
- spec/dummy/app/helpers/application_helper.rb
|
508
530
|
- spec/dummy/app/mailers/.gitkeep
|
509
531
|
- spec/dummy/app/models/.gitkeep
|
532
|
+
- spec/dummy/app/models/ability.rb
|
510
533
|
- spec/dummy/app/models/adminpanel/categorization.rb
|
511
534
|
- spec/dummy/app/models/adminpanel/category.rb
|
512
535
|
- spec/dummy/app/models/adminpanel/photo.rb
|
@@ -550,7 +573,6 @@ files:
|
|
550
573
|
- spec/generators/initialize_generator_spec.rb
|
551
574
|
- spec/generators/resource_generator_spec.rb
|
552
575
|
- spec/models/gallery_spec.rb
|
553
|
-
- spec/models/product_spec.rb
|
554
576
|
- spec/models/section_spec.rb
|
555
577
|
- spec/models/user_spec.rb
|
556
578
|
- spec/spec_helper.rb
|
@@ -605,12 +627,12 @@ test_files:
|
|
605
627
|
- spec/dummy/app/assets/javascripts/application.js
|
606
628
|
- spec/dummy/app/assets/stylesheets/application.css
|
607
629
|
- spec/dummy/app/controllers/adminpanel/.gitkeep
|
608
|
-
- spec/dummy/app/controllers/adminpanel/categories_controller.rb
|
609
630
|
- spec/dummy/app/controllers/adminpanel/products_controller.rb
|
610
631
|
- spec/dummy/app/controllers/application_controller.rb
|
611
632
|
- spec/dummy/app/helpers/application_helper.rb
|
612
633
|
- spec/dummy/app/mailers/.gitkeep
|
613
634
|
- spec/dummy/app/models/.gitkeep
|
635
|
+
- spec/dummy/app/models/ability.rb
|
614
636
|
- spec/dummy/app/models/adminpanel/categorization.rb
|
615
637
|
- spec/dummy/app/models/adminpanel/category.rb
|
616
638
|
- spec/dummy/app/models/adminpanel/photo.rb
|
@@ -654,7 +676,6 @@ test_files:
|
|
654
676
|
- spec/generators/initialize_generator_spec.rb
|
655
677
|
- spec/generators/resource_generator_spec.rb
|
656
678
|
- spec/models/gallery_spec.rb
|
657
|
-
- spec/models/product_spec.rb
|
658
679
|
- spec/models/section_spec.rb
|
659
680
|
- spec/models/user_spec.rb
|
660
681
|
- spec/spec_helper.rb
|