ouvrages_scaffold 0.1.3 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 02b174446e2df6fd5be773cb74fa4d0c537d26b0
4
+ data.tar.gz: ffcd1ce1d091787b7aa2c9b51c1019d82058d63a
5
+ SHA512:
6
+ metadata.gz: 52c635cf951f4aacf874aaa82a8ff89ca8dc62a5fe8b067a9156f042dc5433240dd02cdedc37e6f74067b47b284998c2c612cc28475b62914b838535ccbdf493
7
+ data.tar.gz: 95e2721228e3aa6d3a28369dc7a76da75ce7dd1452b98deefd5693ebede24121731794de2f26dfdb24f4bcc56d6d1207b4a3228c4accf6c3ab89fe0f605a1121
@@ -21,7 +21,7 @@ fr:
21
21
  edit: &edit Modifier
22
22
  destroy: &destroy Supprimer
23
23
  confirm: &confirm <%= capitalize_first_letter(the_resource) %> sera <%= gender_select(m: "supprimé", f: "supprimée") %>. Êtes vous sûr ?
24
- new: Créer <%= a_resource %>
24
+ new: Ajouter <%= a_resource %>
25
25
  empty: La liste est vide.
26
26
 
27
27
  edit:
@@ -0,0 +1,3 @@
1
+ - if can? :read, <%= model_name %>
2
+ %li{class: params[:controller] == "<%= plural_resource_name %>" ? "active" : ""}
3
+ %a{href: <%= plural_resource_name %>_path}= t("navigation.<%= plural_resource_name %>")
@@ -19,6 +19,10 @@ module Ouvrages
19
19
  generate_views
20
20
  end
21
21
 
22
+ def add_to_navbar
23
+ append_to_file "app/views/layouts/_navbar.html.haml", "= render '#{plural_resource_name}/nav'\n"
24
+ end
25
+
22
26
  protected
23
27
 
24
28
  def initialize_views_variables
@@ -76,7 +80,9 @@ module Ouvrages
76
80
  "new.html.#{ext}" => File.join('app/views', @controller_file_path, "new.html.#{ext}"),
77
81
  "edit.html.#{ext}" => File.join('app/views', @controller_file_path, "edit.html.#{ext}"),
78
82
  "#{form_builder}_form.html.#{ext}" => File.join('app/views', @controller_file_path, "_form.html.#{ext}"),
79
- "show.html.#{ext}" => File.join('app/views', @controller_file_path, "show.html.#{ext}")}
83
+ "show.html.#{ext}" => File.join('app/views', @controller_file_path, "show.html.#{ext}"),
84
+ "_nav.html.#{ext}" => File.join('app/views', @controller_file_path, "_nav.html.#{ext}"),
85
+ }
80
86
  selected_views = views
81
87
  options.engine == generate_erb(selected_views)
82
88
  end
@@ -1,3 +1,3 @@
1
1
  module OuvragesScaffold
2
- VERSION = "0.1.3"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,78 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ouvrages_scaffold
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
5
- prerelease:
4
+ version: 0.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ouvrages
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-08-02 00:00:00.000000000 Z
11
+ date: 2013-10-24 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bootstrap_forms
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: httparty
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: will_paginate-bootstrap
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: will-paginate-i18n
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  description: Rails scaffold in HAML, using cancan and bootstrap
@@ -98,6 +89,7 @@ files:
98
89
  - lib/generators/ouvrages/routes/routes_generator.rb
99
90
  - lib/generators/ouvrages/scaffold/scaffold_generator.rb
100
91
  - lib/generators/ouvrages/views/templates/_form.html.haml
92
+ - lib/generators/ouvrages/views/templates/_nav.html.haml
101
93
  - lib/generators/ouvrages/views/templates/edit.html.haml
102
94
  - lib/generators/ouvrages/views/templates/index.html.haml
103
95
  - lib/generators/ouvrages/views/templates/new.html.haml
@@ -109,26 +101,25 @@ files:
109
101
  - ouvrages_scaffold.gemspec
110
102
  homepage: https://github.com/ouvrages/rails-cancan-bootstrap-scaffold
111
103
  licenses: []
104
+ metadata: {}
112
105
  post_install_message:
113
106
  rdoc_options: []
114
107
  require_paths:
115
108
  - lib
116
109
  required_ruby_version: !ruby/object:Gem::Requirement
117
- none: false
118
110
  requirements:
119
- - - ! '>='
111
+ - - '>='
120
112
  - !ruby/object:Gem::Version
121
113
  version: '0'
122
114
  required_rubygems_version: !ruby/object:Gem::Requirement
123
- none: false
124
115
  requirements:
125
- - - ! '>='
116
+ - - '>='
126
117
  - !ruby/object:Gem::Version
127
118
  version: '0'
128
119
  requirements: []
129
120
  rubyforge_project:
130
- rubygems_version: 1.8.23
121
+ rubygems_version: 2.0.7
131
122
  signing_key:
132
- specification_version: 3
123
+ specification_version: 4
133
124
  summary: Rails generators that produce HAML views to be used with Bootstrap and Cancan.
134
125
  test_files: []