padrino-admin 0.9.14 → 0.9.15

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE CHANGED
@@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
17
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
18
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
19
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -64,7 +64,7 @@ module Padrino
64
64
 
65
65
  admin_app = Padrino::Generators::AdminPage.new(["account"], :root => options[:root])
66
66
  admin_app.default_orm = Padrino::Admin::Generators::Orm.new(:account, orm, columns, column_fields)
67
- admin_app.invoke
67
+ admin_app.invoke_all
68
68
 
69
69
  template "templates/account/#{orm}.rb.tt", destination_root("app", "models", "account.rb"), :force => true
70
70
  template "templates/account/seeds.rb.tt", destination_root("db/seeds.rb")
@@ -78,7 +78,7 @@ module Padrino
78
78
  gsub_file destination_root("admin/views/accounts/_form.#{ext}"), "f.text_field :role, :class => :text_field", "f.select :role, :options => access_control.roles"
79
79
  gsub_file destination_root("admin/controllers/accounts.rb"), "if account.destroy", "if account != current_account && account.destroy"
80
80
  return if self.behavior == :revoke
81
- say (<<-TEXT).gsub(/ {10}/,'')
81
+ say((<<-TEXT).gsub(/ {10}/,''))
82
82
 
83
83
  =================================================================
84
84
  The admin panel has been mounted! Next, follow these steps:
@@ -90,7 +90,7 @@ module Padrino
90
90
 
91
91
  TEXT
92
92
  else
93
- say "You are not at the root of a Padrino application! (config/boot.rb not found)" and exit unless in_app_root?
93
+ say "You are not at the root of a Padrino application! (config/boot.rb not found)"
94
94
  end
95
95
  end
96
96
  end # AdminApp
@@ -9,7 +9,7 @@ module Padrino
9
9
 
10
10
  # Define the source template root
11
11
  def self.source_root; File.expand_path(File.dirname(__FILE__)); end
12
- def self.banner; "padrino-gen admin_page [Model]"; end
12
+ def self.banner; "padrino-gen admin_page [model]"; end
13
13
 
14
14
  # Include related modules
15
15
  include Thor::Actions
@@ -43,7 +43,7 @@ module Padrino
43
43
  add_project_module(@orm.name_plural)
44
44
  end
45
45
  else
46
- say "You are not at the root of a Padrino application! (config/boot.rb not found)" and return unless in_app_root?
46
+ say "You are not at the root of a Padrino application! (config/boot.rb not found)"
47
47
  end
48
48
  end
49
49
  end # AdminPage
@@ -14,7 +14,7 @@ module Padrino
14
14
  @orm = orm.to_sym
15
15
  @columns = columns
16
16
  @column_fields = column_fields
17
- raise OrmError, "Model #{name} was not found!" if @columns.nil? && @klass.nil?
17
+ raise OrmError, "Model '#{name}' could not be found!" if @columns.nil? && @klass.nil?
18
18
  end
19
19
 
20
20
  def field_type(type)
@@ -99,4 +99,4 @@ module Padrino
99
99
  end # AuthenticationHelpers
100
100
  end # Helpers
101
101
  end # Admin
102
- end # Padrino
102
+ end # Padrino
@@ -0,0 +1,16 @@
1
+ nl:
2
+ padrino:
3
+ admin:
4
+ save: Opslaan
5
+ cancel: Annuleren
6
+ list: Lijst
7
+ edit: Bewerken
8
+ new: Nieuw
9
+ show: Toon
10
+ delete: Verwijderen
11
+ confirm: Weet u het zeker?
12
+ created_at: Aangemaakt op
13
+ all: Alle
14
+ profile: Profiel
15
+ settings: Voorkeuren
16
+ logout: Afmelden
@@ -0,0 +1,16 @@
1
+ pl:
2
+ padrino:
3
+ admin:
4
+ save: Zapisz
5
+ cancel: Anuluj
6
+ list: Lista
7
+ edit: Edycja
8
+ new: Nowy
9
+ show: Pokaż
10
+ delete: Usuń
11
+ confirm: Na pewno?
12
+ created_at: Utworzono
13
+ all: Wszystkie
14
+ profile: Profil
15
+ settings: Ustawienia
16
+ logout: Wyloguj
@@ -9,18 +9,18 @@ cz:
9
9
  accepted: "musí být potvrzeno"
10
10
  empty: "nesmí být prázdný/é"
11
11
  blank: "je povinná položka"
12
- too_long: "je příliš dlouhá/ý (max. {{count}} znaků)"
13
- too_short: "je příliš krátký/á (min. {{count}} znaků)"
14
- wrong_length: "nemá správnou délku (očekáváno {{count}} znaků)"
12
+ too_long: "je příliš dlouhá/ý (max. %{count} znaků)"
13
+ too_short: "je příliš krátký/á (min. %{count} znaků)"
14
+ wrong_length: "nemá správnou délku (očekáváno %{count} znaků)"
15
15
  taken: "již databáze obsahuje"
16
16
  not_a_number: "není číslo"
17
- greater_than: "musí být větší než {{count}}"
18
- greater_than_or_equal_to: "musí být větší nebo rovno {{count}}"
19
- equal_to: "musí být rovno {{count}}"
20
- less_than: "musí být méně než {{count}}"
21
- less_than_or_equal_to: "musí být méně nebo rovno {{count}}"
17
+ greater_than: "musí být větší než %{count}"
18
+ greater_than_or_equal_to: "musí být větší nebo rovno %{count}"
19
+ equal_to: "musí být rovno %{count}"
20
+ less_than: "musí být méně než %{count}"
21
+ less_than_or_equal_to: "musí být méně nebo rovno %{count}"
22
22
  odd: "musí být liché číslo"
23
23
  even: "musí být sudé číslo"
24
- record_invalid: "Následující pole obsahují chybně vyplněné údaje: {{errors}}"
24
+ record_invalid: "Následující pole obsahují chybně vyplněné údaje: %{errors}"
25
25
  content_type: "nepodporovaný formát souboru"
26
26
  activerecord: *activemodel
@@ -23,4 +23,4 @@ en:
23
23
  even: "must be even"
24
24
  record_invalid: "Validation failed: %{errors}"
25
25
  content_type: "file format not supported"
26
- activerecord: *activemodel
26
+ activerecord: *activemodel
@@ -0,0 +1,26 @@
1
+ nl:
2
+ activemodel: &activemodel
3
+ errors:
4
+ messages:
5
+ inclusion: is niet in de lijst opgenomen
6
+ exclusion: is niet beschikbaar
7
+ invalid: is ongeldig
8
+ confirmation: komt niet met de bevestiging overeen
9
+ accepted: moet worden geaccepteerd
10
+ empty: moet opgegeven zijn
11
+ blank: moet opgegeven zijn
12
+ too_long: "is te lang (maximaal %{count} tekens)"
13
+ too_short: "is te kort (minimaal %{count} tekens)"
14
+ wrong_length: "heeft niet de juiste lengte (moet %{count} tekens lang zijn)"
15
+ taken: "is reeds in gebruik"
16
+ not_a_number: "is geen getal"
17
+ greater_than: "moet groter dan %{count} zijn"
18
+ greater_than_or_equal_to: "moet groter dan of gelijk aan %{count} zijn"
19
+ equal_to: "must gelijk aan %{count} zijn"
20
+ less_than: "moet minder dan %{count} zjn"
21
+ less_than_or_equal_to: "moet minder dan of gelijk aan %{count} zijn"
22
+ odd: "moet oneven zijn"
23
+ even: "moet even zijn"
24
+ record_invalid: "Validatie mislukt: %{errors}"
25
+ content_type: "bestandsformaat niet ondersteund"
26
+ activerecord: *activemodel
@@ -0,0 +1,27 @@
1
+ pl:
2
+ activemodel: &activemodel
3
+ errors:
4
+ messages:
5
+ inclusion: "nie znajduje się na liście dopuszczalnych wartości"
6
+ exclusion: "znajduje się na liście zabronionych wartości"
7
+ invalid: "jest nieprawidłowe"
8
+ confirmation: "nie zgadza się z potwierdzeniem"
9
+ accepted: "musi być zaakceptowane"
10
+ empty: "nie może być puste"
11
+ blank: "nie może być puste"
12
+ too_long: "jest za długie (maksymalnie %{count} znaków)"
13
+ too_short: "jest za krótkie (minimalnie %{count} znaków)"
14
+ wrong_length: "jest nieprawidłowej długości (powinna wynosić %{count} znaków)"
15
+ taken: "zostało już zajęte"
16
+ not_a_number: "nie jest liczbą"
17
+ not_an_integer: "nie jest liczbą całkowitą"
18
+ greater_than: "musi być większe niż %{count}"
19
+ greater_than_or_equal_to: "musi być większe lub równe %{count}"
20
+ equal_to: "musi być równe %{count}"
21
+ less_than: "musi być mniejsze niż %{count}"
22
+ less_than_or_equal_to: "musi być mniejsze lub równe %{count}"
23
+ odd: "musi być nieparzyste"
24
+ even: "musi być parzyste"
25
+ record_invalid: "Negatywne sprawdzenie poprawności: %{errors}"
26
+ content_type: "nieodozwolony format pliku"
27
+ activerecord: *activemodel
@@ -1,24 +1,21 @@
1
1
  require File.expand_path("../../padrino-core/lib/padrino-core/version.rb", __FILE__)
2
- require 'rubygems'
3
- require 'bundler'
4
2
 
5
3
  Gem::Specification.new do |s|
6
- s.name = %q{padrino-admin}
7
- s.rubyforge_project = %q{padrino-admin}
4
+ s.name = "padrino-admin"
5
+ s.rubyforge_project = "padrino-admin"
8
6
  s.authors = ["Padrino Team", "Nathan Esquenazi", "Davide D'Agostino", "Arthur Chiu"]
9
- s.email = %q{padrinorb@gmail.com}
10
- s.summary = %q{Admin Dashboard for Padrino}
11
- s.homepage = %q{http://github.com/padrino/padrino-framework/tree/master/padrino-admin}
12
- s.description = %q{Admin View for Padrino applications}
7
+ s.email = "padrinorb@gmail.com"
8
+ s.summary = "Admin Dashboard for Padrino"
9
+ s.homepage = "http://www.padrinorb.com"
10
+ s.description = "Admin View for Padrino applications"
13
11
  s.required_rubygems_version = ">= 1.3.6"
14
12
  s.version = Padrino.version
15
13
  s.date = Time.now.strftime("%Y-%m-%d")
16
14
  s.extra_rdoc_files = Dir["*.rdoc"]
17
15
  s.files = %w(.document .gitignore LICENSE README.rdoc Rakefile padrino-admin.gemspec) + Dir.glob("{bin,lib,test}/**/*")
18
16
  s.rdoc_options = ["--charset=UTF-8"]
19
- s.require_path = 'lib'
20
- s.add_runtime_dependency(%q<padrino-core>, ["= #{Padrino.version}"])
21
- s.add_runtime_dependency(%q<padrino-gen>, ["= #{Padrino.version}"])
22
- s.add_runtime_dependency(%q<padrino-helpers>, ["= #{Padrino.version}"])
23
- s.add_bundler_dependencies :development
17
+ s.require_path = "lib"
18
+ s.add_dependency("padrino-core", Padrino.version)
19
+ s.add_dependency("padrino-gen", Padrino.version)
20
+ s.add_dependency("padrino-helpers", Padrino.version)
24
21
  end
data/test/helper.rb CHANGED
@@ -7,14 +7,6 @@ require 'rack/test'
7
7
  require 'rack'
8
8
  require 'shoulda'
9
9
  require 'thor/group'
10
-
11
- # We try to load the vendored padrino-core if exist
12
- %w(core gen helpers).each do |lib|
13
- if File.exist?(File.dirname(__FILE__) + "/../../padrino-#{lib}/lib")
14
- $:.unshift File.dirname(__FILE__) + "/../../padrino-#{lib}/lib"
15
- end
16
- end
17
-
18
10
  require 'padrino-core/support_lite' unless defined?(SupportLite)
19
11
  require 'padrino-admin'
20
12
 
@@ -88,7 +80,7 @@ class Test::Unit::TestCase
88
80
  end
89
81
 
90
82
  def assert_no_match_in_file(pattern, file)
91
- File.exists?(file) ? !assert_match(pattern, File.read(file)) : assert_file_exists(file)
83
+ File.exists?(file) ? assert_no_match(pattern, File.read(file)) : assert_file_exists(file)
92
84
  end
93
85
 
94
86
  # Delegate other missing methods to response.
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: padrino-admin
3
3
  version: !ruby/object:Gem::Version
4
- hash: 39
4
+ hash: 37
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 14
10
- version: 0.9.14
9
+ - 15
10
+ version: 0.9.15
11
11
  platform: ruby
12
12
  authors:
13
13
  - Padrino Team
@@ -18,153 +18,57 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2010-06-30 00:00:00 -07:00
21
+ date: 2010-08-28 00:00:00 +02:00
22
22
  default_executable:
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency
25
+ name: padrino-core
26
+ prerelease: false
25
27
  requirement: &id001 !ruby/object:Gem::Requirement
26
28
  none: false
27
29
  requirements:
28
30
  - - "="
29
31
  - !ruby/object:Gem::Version
30
- hash: 39
32
+ hash: 37
31
33
  segments:
32
34
  - 0
33
35
  - 9
34
- - 14
35
- version: 0.9.14
36
+ - 15
37
+ version: 0.9.15
36
38
  type: :runtime
37
- name: padrino-core
38
- prerelease: false
39
39
  version_requirements: *id001
40
40
  - !ruby/object:Gem::Dependency
41
+ name: padrino-gen
42
+ prerelease: false
41
43
  requirement: &id002 !ruby/object:Gem::Requirement
42
44
  none: false
43
45
  requirements:
44
46
  - - "="
45
47
  - !ruby/object:Gem::Version
46
- hash: 39
48
+ hash: 37
47
49
  segments:
48
50
  - 0
49
51
  - 9
50
- - 14
51
- version: 0.9.14
52
+ - 15
53
+ version: 0.9.15
52
54
  type: :runtime
53
- name: padrino-gen
54
- prerelease: false
55
55
  version_requirements: *id002
56
56
  - !ruby/object:Gem::Dependency
57
+ name: padrino-helpers
58
+ prerelease: false
57
59
  requirement: &id003 !ruby/object:Gem::Requirement
58
60
  none: false
59
61
  requirements:
60
62
  - - "="
61
63
  - !ruby/object:Gem::Version
62
- hash: 39
64
+ hash: 37
63
65
  segments:
64
66
  - 0
65
67
  - 9
66
- - 14
67
- version: 0.9.14
68
+ - 15
69
+ version: 0.9.15
68
70
  type: :runtime
69
- name: padrino-helpers
70
- prerelease: false
71
71
  version_requirements: *id003
72
- - !ruby/object:Gem::Dependency
73
- requirement: &id004 !ruby/object:Gem::Requirement
74
- none: false
75
- requirements:
76
- - - ">="
77
- - !ruby/object:Gem::Version
78
- hash: 49
79
- segments:
80
- - 0
81
- - 8
82
- - 7
83
- version: 0.8.7
84
- type: :development
85
- name: rake
86
- prerelease: false
87
- version_requirements: *id004
88
- - !ruby/object:Gem::Dependency
89
- requirement: &id005 !ruby/object:Gem::Requirement
90
- none: false
91
- requirements:
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- hash: 43
95
- segments:
96
- - 0
97
- - 9
98
- - 8
99
- version: 0.9.8
100
- type: :development
101
- name: mocha
102
- prerelease: false
103
- version_requirements: *id005
104
- - !ruby/object:Gem::Dependency
105
- requirement: &id006 !ruby/object:Gem::Requirement
106
- none: false
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- hash: 11
111
- segments:
112
- - 0
113
- - 5
114
- - 0
115
- version: 0.5.0
116
- type: :development
117
- name: rack-test
118
- prerelease: false
119
- version_requirements: *id006
120
- - !ruby/object:Gem::Dependency
121
- requirement: &id007 !ruby/object:Gem::Requirement
122
- none: false
123
- requirements:
124
- - - ">="
125
- - !ruby/object:Gem::Version
126
- hash: 9
127
- segments:
128
- - 0
129
- - 5
130
- - 1
131
- version: 0.5.1
132
- type: :development
133
- name: webrat
134
- prerelease: false
135
- version_requirements: *id007
136
- - !ruby/object:Gem::Dependency
137
- requirement: &id008 !ruby/object:Gem::Requirement
138
- none: false
139
- requirements:
140
- - - ">="
141
- - !ruby/object:Gem::Version
142
- hash: 43
143
- segments:
144
- - 2
145
- - 2
146
- - 22
147
- version: 2.2.22
148
- type: :development
149
- name: haml
150
- prerelease: false
151
- version_requirements: *id008
152
- - !ruby/object:Gem::Dependency
153
- requirement: &id009 !ruby/object:Gem::Requirement
154
- none: false
155
- requirements:
156
- - - ">="
157
- - !ruby/object:Gem::Version
158
- hash: 33
159
- segments:
160
- - 2
161
- - 10
162
- - 3
163
- version: 2.10.3
164
- type: :development
165
- name: shoulda
166
- prerelease: false
167
- version_requirements: *id009
168
72
  description: Admin View for Padrino applications
169
73
  email: padrinorb@gmail.com
170
74
  executables: []
@@ -234,6 +138,8 @@ files:
234
138
  - lib/padrino-admin/locale/admin/es.yml
235
139
  - lib/padrino-admin/locale/admin/fr.yml
236
140
  - lib/padrino-admin/locale/admin/it.yml
141
+ - lib/padrino-admin/locale/admin/nl.yml
142
+ - lib/padrino-admin/locale/admin/pl.yml
237
143
  - lib/padrino-admin/locale/admin/pt_br.yml
238
144
  - lib/padrino-admin/locale/admin/ru.yml
239
145
  - lib/padrino-admin/locale/admin/tr.yml
@@ -245,6 +151,8 @@ files:
245
151
  - lib/padrino-admin/locale/orm/es.yml
246
152
  - lib/padrino-admin/locale/orm/fr.yml
247
153
  - lib/padrino-admin/locale/orm/it.yml
154
+ - lib/padrino-admin/locale/orm/nl.yml
155
+ - lib/padrino-admin/locale/orm/pl.yml
248
156
  - lib/padrino-admin/locale/orm/pt_br.yml
249
157
  - lib/padrino-admin/locale/orm/ru.yml
250
158
  - lib/padrino-admin/locale/orm/tr.yml
@@ -257,7 +165,7 @@ files:
257
165
  - test/helper.rb
258
166
  - test/test_admin_application.rb
259
167
  has_rdoc: true
260
- homepage: http://github.com/padrino/padrino-framework/tree/master/padrino-admin
168
+ homepage: http://www.padrinorb.com
261
169
  licenses: []
262
170
 
263
171
  post_install_message: