padrino-gen 0.13.3.1 → 0.13.3.2

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: 67b06756e1fe1f0e22530b73a638af3a544fae41
4
- data.tar.gz: be966e3a491af5889250e0d0aec0fce731d1b6d1
3
+ metadata.gz: 9cfa6876ae815eb7dec7d95d022ae7c8ce4e9561
4
+ data.tar.gz: d01e1c8ab3909d83acba24d64a87bb95cc61bcf3
5
5
  SHA512:
6
- metadata.gz: e5b48162c06b15e0e5607634ce96dafa719e3859184416c85fe443495ee3de34f70c8c02e08a97f0bb655dcda88c84761b3d3480d52dc042f28570cc4ecb96c7
7
- data.tar.gz: baf2a475a95874fb86f4fd16e45fc7949a54ceb31b60fb2d6c2b80057afae521bc0e402f3e93d77faa52e560f8738458e78d7678fbeab74b435a7d2a4dfa6137
6
+ metadata.gz: a96d30a83ed9a8d263b69be4a4d96d1b869188ab646f216f2b2e7e0b1b89b80e1b9654581562ba3e2a23777f1407d984075c9582b71a095e7e054ae50bebe629
7
+ data.tar.gz: 5dd7aa64ac415b217db0859840f8d4ad68f61c199b5a3a72b31973fcd7952a6bc4059f02857138d4b936661b659c82b2c0bcb8aa324bbe39cb2c7a58b5952621
@@ -0,0 +1,36 @@
1
+ if defined? ActiveSupport
2
+ require 'active_support/core_ext/string/inflections'
3
+ else
4
+ require 'padrino-support/inflections'
5
+
6
+ class String
7
+ def pluralize
8
+ Padrino::Inflections.pluralize(TemporaryString.new(to_str)).to_str
9
+ end
10
+
11
+ def underscore
12
+ Padrino::Inflections.underscore(TemporaryString.new(to_str)).to_str
13
+ end
14
+
15
+ def camelize
16
+ Padrino::Inflections.camelize(TemporaryString.new(to_str)).to_str
17
+ end
18
+
19
+ def classify
20
+ Padrino::Inflections.classify(TemporaryString.new(to_str)).to_str
21
+ end
22
+
23
+ def constantize
24
+ Padrino::Inflections.constantize(TemporaryString.new(to_str))
25
+ end
26
+ end
27
+
28
+ class TemporaryString < String
29
+ undef_method :pluralize
30
+ undef_method :underscore
31
+ undef_method :camelize
32
+ undef_method :classify
33
+ undef_method :constantize
34
+ def to_s; self; end
35
+ end
36
+ end
@@ -12,6 +12,10 @@ Bundler.require(:default, RACK_ENV)
12
12
  # Padrino::Logger::Config[:development][:log_level] = :devel
13
13
  # Padrino::Logger::Config[:development][:log_static] = true
14
14
  #
15
+ # ## Configure Ruby to allow requiring features from your lib folder
16
+ #
17
+ # $LOAD_PATH.unshift Padrino.root('lib')
18
+ #
15
19
  # ## Enable logging of source location
16
20
  #
17
21
  # Padrino::Logger::Config[:development][:source_location] = true
@@ -80,6 +80,7 @@ if PadrinoTasks.load?(:sequel, defined?(Sequel))
80
80
  end
81
81
  end
82
82
 
83
+ task 'db:create' => 'sq:create'
83
84
  task 'db:migrate' => 'sq:migrate'
84
85
  task 'db:reset' => 'sq:reset'
85
86
  end
data/lib/padrino-gen.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'padrino-core/tasks'
2
2
  require 'padrino-gen/command'
3
+ require 'padrino-gen/core_ext/string'
3
4
  require 'yaml'
4
5
 
5
6
  module Padrino
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: padrino-gen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.3.1
4
+ version: 0.13.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Padrino Team
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-08-30 00:00:00.000000000 Z
14
+ date: 2016-09-06 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: padrino-core
@@ -19,14 +19,14 @@ dependencies:
19
19
  requirements:
20
20
  - - '='
21
21
  - !ruby/object:Gem::Version
22
- version: 0.13.3.1
22
+ version: 0.13.3.2
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 0.13.3.1
29
+ version: 0.13.3.2
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: bundler
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -47,28 +47,28 @@ dependencies:
47
47
  requirements:
48
48
  - - '='
49
49
  - !ruby/object:Gem::Version
50
- version: 0.13.3.1
50
+ version: 0.13.3.2
51
51
  type: :development
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
55
  - - '='
56
56
  - !ruby/object:Gem::Version
57
- version: 0.13.3.1
57
+ version: 0.13.3.2
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: padrino-mailer
60
60
  requirement: !ruby/object:Gem::Requirement
61
61
  requirements:
62
62
  - - '='
63
63
  - !ruby/object:Gem::Version
64
- version: 0.13.3.1
64
+ version: 0.13.3.2
65
65
  type: :development
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - '='
70
70
  - !ruby/object:Gem::Version
71
- version: 0.13.3.1
71
+ version: 0.13.3.2
72
72
  description: Generators for easily creating and building padrino applications from
73
73
  the console
74
74
  email: padrinorb@gmail.com
@@ -87,6 +87,7 @@ files:
87
87
  - bin/padrino-gen
88
88
  - lib/padrino-gen.rb
89
89
  - lib/padrino-gen/command.rb
90
+ - lib/padrino-gen/core_ext/string.rb
90
91
  - lib/padrino-gen/generators/actions.rb
91
92
  - lib/padrino-gen/generators/app.rb
92
93
  - lib/padrino-gen/generators/app/app.rb.tt