agilib 0.1.2.beta6 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 62dffa841b8c191e19592059514999066b90af5a
4
- data.tar.gz: 5f362351c2297483d88a25db1c7f90b1113177e8
3
+ metadata.gz: e4cb733ee33928959b9c3429fe3b916d208539cb
4
+ data.tar.gz: 8c9dc8918a559878a1bdd58b9206592de62c469a
5
5
  SHA512:
6
- metadata.gz: b048c1c96b95b9b8bcf1f544da4b1ece6f0cc870a63a2fa160c95bb459ff929f0ee475fb265dabb198067309a09021d2a60d69a3bd9f1403e0da5493b13bc0d9
7
- data.tar.gz: 272f1743fe82b90e3414a024edbd3d006875b1dbc17fe501ef317f1a1fc1e538fdb28d050cb004f816f4f8537fd8f9c86296fa8f5f947ec81939f51b5e660974
6
+ metadata.gz: e3503dec9abedcee12e4b92b5d5633e2398a735ce1fc5e95000045d39a9b8258e4c64f18af27e1f3475cdce65bb3fa65b2b98a923413e028fcb9bfbef9d9e9a0
7
+ data.tar.gz: b1858d94145776431c95661f8a189b161252e5b9ff3b75630bc1b94cb1bfb819b1c871a0c381bf34024691ff86d98941ba55749f0c9fad61d5035cf4e9bb6328
@@ -16,7 +16,26 @@ module Agilib
16
16
 
17
17
  # Instala uma aplicação Rails
18
18
  system("rails new #{name} --skip-bundle --skip-test-unit -d mysql -m #{Agilib::Composer.template_runner}")
19
- end
19
+ end
20
+
21
+ desc "setup", "Prepara o ambiente para a aplicação"
22
+ def setup()
23
+
24
+ say("\n\nInstalando RVM\n\n\n")
25
+ system("curl -sSL https://get.rvm.io | bash -s stable")
26
+
27
+ system("source ~/.profile")
28
+
29
+ say("\n\nInstalando Ruby\n\n")
30
+
31
+ system("rvm install 2.1.0")
32
+
33
+ say("\n\nInstando a gem Bundler")
34
+ system("gem install bundler")
35
+
36
+ end
37
+
38
+
20
39
  end
21
40
  end
22
41
  end
@@ -1,7 +1,7 @@
1
1
  gem 'meta_request', :group => [:development]
2
2
  gem 'better_errors', :group => [:development]
3
3
  gem 'binding_of_caller', :group => [:development]
4
- gem 'sprockets_better_errors', :group => [:development]
4
+ # gem 'sprockets_better_errors', :group => [:development]
5
5
 
6
6
  templater.post_bundler do
7
7
  inject_into_file "config/environments/development.rb", "\n\nconfig.assets.raise_production_errors = true", :after => "Dna::Application.configure do"
@@ -1,21 +1,15 @@
1
1
  gem "bootstrap-generators"
2
+ gem 'font-awesome-sass', '4.0.2'
2
3
 
3
4
  templater.post_bundler do
4
5
 
5
6
  generate 'bootstrap:install', '-f'
6
7
 
7
- if defined? app_name
8
- name = app_name
9
- elsif defined? application_name
10
- name = application_name
11
- end
12
-
13
- gsub_file "app/views/layouts/application.html.erb", "<title>Starter Template for Bootstrap</title>", "<title>#{name.capitalize} App</title>"
14
- gsub_file "app/views/layouts/application.html.erb", '<%= link_to "Project name", "#", :class => "navbar-brand" %>', "<%= link_to \"#{name.capitalize} App\", agilib_root_path, :class => \"navbar-brand\" %>"
15
-
16
8
  gsub_file "app/assets/stylesheets/bootstrap-variables.scss", '$navbar-inverse-bg: #222 !default;', "$navbar-inverse-bg: #0085a6 !default;"
17
9
  gsub_file "app/assets/stylesheets/bootstrap-variables.scss", '$navbar-inverse-link-color: $gray-light !default;', "$navbar-inverse-link-color: #fff !default;"
18
10
  gsub_file "app/assets/stylesheets/bootstrap-variables.scss", '$navbar-inverse-link-hover-color: #fff !default;', "$navbar-inverse-link-hover-color: $gray-light !default;"
19
11
  gsub_file "app/assets/stylesheets/bootstrap-variables.scss", '$navbar-inverse-link-active-color: $navbar-inverse-link-hover-color !default;', "$navbar-inverse-link-active-color: #46a4bd !default;"
20
12
 
13
+ remove_file "app/assets/stylesheets/bootstrap-generators.scss"
14
+
21
15
  end
@@ -14,17 +14,6 @@ templater.post_bundler do
14
14
 
15
15
  generate 'devise:views'
16
16
 
17
- devise_form_config = <<-TEXT
18
- <%= f.input :name, :required => true, :autofocus => true %>
19
- TEXT
20
-
21
- inject_into_file "app/views/devise/registrations/new.html.erb", devise_form_config, :before => "<%= f.input :email, :required => true, :autofocus => true %>"
22
- gsub_file "app/views/devise/registrations/new.html.erb", '<%= f.input :email, :required => true, :autofocus => true %>', '<%= f.input :email, :required => true %>'
23
-
24
- inject_into_file "app/views/devise/registrations/edit.html.erb", devise_form_config, :before => "<%= f.input :email, :required => true, :autofocus => true %>"
25
- gsub_file "app/views/devise/registrations/edit.html.erb", '<%= f.input :email, :required => true, :autofocus => true %>', '<%= f.input :email, :required => true %>'
26
-
27
-
28
17
  devise_filter_config = <<-TEXT
29
18
 
30
19
 
@@ -0,0 +1,46 @@
1
+ gem "rails_layout", :group => [:development]
2
+
3
+ templater.post_bundler do
4
+
5
+ generate 'layout:install', 'bootstrap3 -force'
6
+
7
+ if defined? app_name
8
+ name = app_name
9
+ elsif defined? application_name
10
+ name = application_name
11
+ end
12
+
13
+ gsub_file "app/views/layouts/_navigation.html.erb", "<%= link_to 'Home', root_path, class: 'navbar-brand' %>", "<%= link_to \"#{app_name.capitalize} App\", agilib_root_path, :class => \"navbar-brand\" %>"
14
+
15
+ prepend_file "app/assets/stylesheets/framework_and_overrides.css.scss" do
16
+ <<-RUBY
17
+ @import "bootstrap-variables";
18
+ @import "bootstrap.scss";
19
+ RUBY
20
+ end
21
+
22
+ gsub_file "app/assets/stylesheets/framework_and_overrides.css.scss", '@import "bootstrap";', ""
23
+
24
+ gsub_file "app/assets/stylesheets/framework_and_overrides.css.scss", 'width: 100%', "//width: 100%"
25
+ gsub_file "app/assets/stylesheets/framework_and_overrides.css.scss", 'padding-bottom: 80px', "//padding-bottom: 80px"
26
+ gsub_file "app/assets/stylesheets/framework_and_overrides.css.scss", 'background-color: #eee', "//width: 100%"
27
+ gsub_file "app/assets/stylesheets/framework_and_overrides.css.scss", 'margin-top: 51px', "margin-top: $navbar-height + 10px"
28
+ gsub_file "app/assets/stylesheets/framework_and_overrides.css.scss", 'max-width: 320px;', "max-width: 420px;"
29
+
30
+ generate 'layout:devise', 'bootstrap3 -force'
31
+
32
+ devise_form_config = <<-TEXT
33
+ <div class="form-group">
34
+ <%= f.label :name %>
35
+ <%= f.text_field :name, :autofocus => true, class: 'form-control' %>
36
+ </div>
37
+ TEXT
38
+
39
+ inject_into_file "app/views/devise/registrations/new.html.erb", devise_form_config, :after => "<%= devise_error_messages! %>"
40
+ gsub_file "app/views/devise/registrations/new.html.erb", "<%= f.email_field :email, :autofocus => true, class: 'form-control' %>", "<%= f.email_field :email, class: 'form-control' %>"
41
+
42
+ inject_into_file "app/views/devise/registrations/edit.html.erb", devise_form_config, :after => "<%= devise_error_messages! %>"
43
+ gsub_file "app/views/devise/registrations/edit.html.erb", "<%= f.email_field :email, :autofocus => true, class: 'form-control' %>", "<%= f.email_field :email, class: 'form-control' %>"
44
+
45
+
46
+ end
@@ -11,6 +11,7 @@ gem 'json_spec', :group => [:development, :test]
11
11
 
12
12
  templater.post_bundler do
13
13
 
14
+ rake 'db:migrate'
14
15
  rake 'db:test:prepare'
15
16
 
16
17
  spec_helper_path = 'spec/spec_helper.rb'
@@ -4,7 +4,7 @@ require File.join(File.expand_path('./../../../../', __FILE__), 'agilib.rb')
4
4
  require 'composer'
5
5
  require File.join(File.dirname(__FILE__), 'core_ext.rb')
6
6
 
7
- %w(default gems responders simple_form bootstrap rspec devise token push cancan better_errors finalize).each do |recipe|
7
+ %w(default gems responders simple_form bootstrap rspec devise token push cancan better_errors layout finalize).each do |recipe|
8
8
  apply templater.recipe(recipe)
9
9
  end
10
10
 
@@ -2,9 +2,9 @@ module Agilib
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- PATCH = 2
6
- BUILD = 'beta6'
5
+ PATCH = 3
6
+ BUILD = ''
7
7
 
8
- STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
8
+ STRING = [MAJOR, MINOR, PATCH].compact.join('.')
9
9
  end
10
10
  end
data/lib/agilib.rb CHANGED
@@ -2,6 +2,7 @@ require 'rails'
2
2
  require 'active_support/dependencies'
3
3
  require 'set'
4
4
  require 'securerandom'
5
+ require 'rspec'
5
6
 
6
7
  module Agilib
7
8
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agilib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2.beta6
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcos Junior
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-17 00:00:00.000000000 Z
11
+ date: 2014-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: executable-hooks
@@ -197,6 +197,7 @@ files:
197
197
  - lib/agilib/composer/templates/recipes/devise.rb
198
198
  - lib/agilib/composer/templates/recipes/finalize.rb
199
199
  - lib/agilib/composer/templates/recipes/gems.rb
200
+ - lib/agilib/composer/templates/recipes/layout.rb
200
201
  - lib/agilib/composer/templates/recipes/push.rb
201
202
  - lib/agilib/composer/templates/recipes/responders.rb
202
203
  - lib/agilib/composer/templates/recipes/rspec.rb
@@ -245,9 +246,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
245
246
  version: '0'
246
247
  required_rubygems_version: !ruby/object:Gem::Requirement
247
248
  requirements:
248
- - - ">"
249
+ - - ">="
249
250
  - !ruby/object:Gem::Version
250
- version: 1.3.1
251
+ version: '0'
251
252
  requirements: []
252
253
  rubyforge_project:
253
254
  rubygems_version: 2.2.1