sharp_admin 1.0.4 → 1.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: 185f6c456428c9e2503a8ff72059a8c30aeb0a2d
4
- data.tar.gz: 87f81a9402331cdafb718b5ef7d961eb6ed2875a
3
+ metadata.gz: 52114ce6b82a6330e94300dfc8fab7bf8707a5b8
4
+ data.tar.gz: 57c9ebb861063a136aa8b51db83d7fe64d429a69
5
5
  SHA512:
6
- metadata.gz: 7a05c87def49b70dfbd0cd72b75ac8edacc5eedb2beb633d4ccd698e92f6e01657dd3c3a6f3cd80e535c0569a9fbb9b91f6a690e71a252606c5720733722173e
7
- data.tar.gz: 346ecd1be305fbd737de4ac65c48fdc75441ef6ec7a11f1572a6cdf6280f424682ccb4c6b194139e4830beee1fe2dc7fdd072393d7fdeee4bf84f33e718244f0
6
+ metadata.gz: 2c636e4fd03e66813c45eda0ad2cda6fbaa212a595338a5edf915c479fb5e75f5d591757f893179de35bac892cc25044ed106f6e0ec03697adc5aee5e5504164
7
+ data.tar.gz: a28773397d3fb624ce5b175d5c614c8febf5bb8e95f9f65e48b8f748ca2e49030861cf621943c703d010f71e9f2e875941e3b0c6101c893cfa6b22d0fc23e25a
@@ -49,7 +49,7 @@ describe <%= options[:ns].classify %>::<%= controller_class_name %>Controller do
49
49
  it "redirects to the created <%= singular_table_name %>" do
50
50
  allow(<%= class_name %>).to receive(:new) { mock_<%= singular_table_name %>(:save => true) }
51
51
  post :create, :<%= singular_table_name %> => {}
52
- expect(response).to redirect_to(admin_<%= plural_table_name %>_url)
52
+ expect(response).to redirect_to(<%= options[:ns] %>_<%= plural_table_name %>_url)
53
53
  end
54
54
  end
55
55
 
@@ -97,7 +97,7 @@ describe <%= options[:ns].classify %>::<%= controller_class_name %>Controller do
97
97
  it "redirects to the <%= singular_table_name %>" do
98
98
  allow(<%= class_name %>).to receive(:find) { mock_<%= singular_table_name %>(:update_attributes => true) }
99
99
  put :update, :id => "1"
100
- expect(response).to redirect_to(admin_<%= plural_table_name %>_url)
100
+ expect(response).to redirect_to(<%= options[:ns] %>_<%= plural_table_name %>_url)
101
101
  end
102
102
  end
103
103
 
@@ -128,7 +128,7 @@ describe <%= options[:ns].classify %>::<%= controller_class_name %>Controller do
128
128
  it "redirects to the <%= plural_table_name %> list" do
129
129
  allow(<%= class_name %>).to receive(:find) { mock_<%= singular_table_name %> }
130
130
  delete :destroy, :id => "1"
131
- expect(response).to redirect_to(admin_<%= plural_table_name %>_url)
131
+ expect(response).to redirect_to(<%= options[:ns] %>_<%= plural_table_name %>_url)
132
132
  end
133
133
  end
134
134
 
@@ -3,13 +3,13 @@
3
3
  @<%= singular_table_name %>.errors.full_messages.each do |msg|
4
4
  %li= msg
5
5
 
6
- <% @attributes.each do |attribute| -%>
6
+ - @attributes.each do |attribute|
7
7
  <% next if ["id", "created_at", "updated_at"].include?(attribute.name) -%>
8
8
  .form-group
9
9
  = f.label :<%= attribute.name %>, :class => "col-sm-2 control-label"
10
10
  .col-sm-4
11
11
  = f.text_field :<%= attribute.name %>, :class => "form-control", :placeholder => "<%= attribute.name.capitalize %>"
12
- <% end -%>
12
+
13
13
 
14
14
  - label = @<%= singular_table_name %>.new_record? ? "Create" : "Update"
15
15
  .form-group
@@ -3,5 +3,5 @@
3
3
  Editing
4
4
  = link_to "<%= human_name.downcase %> #{@<%= singular_table_name %>.id}", admin_<%= singular_table_name %>_path(@<%= singular_table_name %>) %>
5
5
 
6
- = form_for [:admin, @<%= singular_table_name %>], :html => { :class => "form-horizontal", :role => "form" } do |f|
6
+ = form_for [<%= options[:ns] %>, @<%= singular_table_name %>], :html => { :class => "form-horizontal", :role => "form" } do |f|
7
7
  = render "form", { :f => f }
@@ -1,20 +1,20 @@
1
1
  .page-header
2
2
  %h3
3
- <%= human_name.capitalize %> <%%= @<%= singular_table_name %>.id %>
3
+ <%= human_name.capitalize %>
4
+ = @<%= singular_table_name %>.id
4
5
 
5
6
  .table.table-bordered
6
- <% @attributes.each do |attribute| -%>
7
- <tr>
8
- <td>= attribute.human_name :</td>
9
- <td><%%= @<%= singular_table_name %>.<%= attribute.name %> %></td>
10
- </tr>
11
- <% end -%>
12
-
13
- <% unless options[:read_only] -%>
14
- <tr>
15
- <td>
7
+ <%- @attributes.each do |attribute| %>
8
+ %tr
9
+ %td= <%= attribute.human_name %>:
10
+ %td
11
+ = @<%= singular_table_name %>.<%= attribute.name %>
12
+ <% end %>
13
+ - unless options[:read_only]
14
+ %tr
15
+ %td
16
16
  Actions
17
- <td>
18
- = link_to "Edit", edit_admin_<%= singular_table_name %>_path(@<%= singular_table_name %>), :class => "btn btn-default"
19
- = link_to("Delete", admin_<%= singular_table_name %>_path(@<%= singular_table_name %>), :data => { :confirm => "Are you sure?" }, :method => :delete, :class => "btn btn-danger")
20
- <% end -%>
17
+ %td
18
+ = link_to "Edit", edit_<%= options[:ns] %>_<%= singular_table_name %>_path(@<%= singular_table_name %>), :class => "btn btn-default"
19
+ = link_to("Delete", <%= options[:ns] %>_<%= singular_table_name %>_path(@<%= singular_table_name %>), :data => { :confirm => "Are you sure?" }, :method => :delete, :class => "btn btn-danger")
20
+
@@ -1,3 +1,3 @@
1
1
  module EasyAdmin
2
- VERSION = "1.0.4"
2
+ VERSION = "1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sharp_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: '1.1'
5
5
  platform: ruby
6
6
  authors:
7
7
  - sharp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-19 00:00:00.000000000 Z
11
+ date: 2015-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 4.2.4
19
+ version: '4.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: 4.2.4
26
+ version: '4.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: haml
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - ">"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '4.0'
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: '0'
40
+ version: '4.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec-activemodel-mocks
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: sqlite3
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
55
  description: generator for your admin.
70
56
  email:
71
57
  - liuqiang_0701@163.com