bootswatch_rails 3.2.0.13 → 3.2.0.14

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: a206925a99b799bf8db48089529cd7459335c658
4
- data.tar.gz: 6847b630b6fbd58394743926cc25a02692a18da5
3
+ metadata.gz: bc8229c4f7f2db9108e71e2808f47c6da1c82a8b
4
+ data.tar.gz: 38b04046df35b7ec432b1a21ca67ec04d2ac023c
5
5
  SHA512:
6
- metadata.gz: 746c88ca7f52c4a98159d25d401126d117f60a4738871d44731697c72d5da0a0ddd1585656be3f4925c27d5a990f6071c6b9e9d517399ceb50bb809a336612bb
7
- data.tar.gz: 0c0b16b89a3fa06965ac716cd7a975a2ef330dab0658bafd72745e4b74b4c1df40aa5266e73c59c16879a13900df4ea5bfdd3f5c896a7e827db555d0cec7e41c
6
+ metadata.gz: 051408e595a9c40eee4fe4234699b3597ad494b958d1dc3b75868d4ff690dbc36d15153b110a1174957296cca01920a40d02a809091cdca073854247d1a74581
7
+ data.tar.gz: b92bacd621ef0d1e574fcde2e54cbb9a4e2a5e62b9d38b4922854088e0aeab77268577763b51f4dd656958029c03d590596fbe2e321d07fd9fe7ae222f7bc4a6
data/Makefile CHANGED
@@ -10,10 +10,10 @@ rel: build
10
10
  ./generate.sh
11
11
  vim lib/bootswatch_rails/version.rb
12
12
  git commit -a
13
+ sudo gem uninstall bootswatch_rails
13
14
  rake release
14
15
 
15
16
  install: build
16
- vim lib/bootswatch_rails/version.rb
17
17
  git commit -a
18
18
  sudo rake install
19
19
 
data/generate.sh CHANGED
@@ -47,7 +47,7 @@ done
47
47
  _engine="lib/bootswatch_rails/engine.rb"
48
48
  if [ -s $_engine ] ; then
49
49
  rm -f /tmp/engine.tmp
50
- sed -e "/assets.precompile/s/=.*/= %w($_themes_css)/" $_engine >/tmp/engine.tmp
50
+ sed -e "/assets.precompile/s/=.*/= %w(bootstrap.js $_themes_css)/" $_engine >/tmp/engine.tmp
51
51
  if cmp -s /tmp/engine.tmp $_engine ; then
52
52
  rm -f /tmp/engine.tmp
53
53
  else
@@ -1,7 +1,7 @@
1
1
  module BootswatchRails
2
2
  class Engine < Rails::Engine
3
3
  initializer "BootswatchRails themes" do |app|
4
- app.config.assets.precompile += %w(amelia.css cerulean.css cosmo.css custom.css cyborg.css darkly.css flatly.css journal.css lumen.css paper.css readable.css sandstone.css simplex.css slate.css spacelab.css superhero.css united.css yeti.css)
4
+ app.config.assets.precompile += %w(bootstrap.js amelia.css cerulean.css cosmo.css custom.css cyborg.css darkly.css flatly.css journal.css lumen.css paper.css readable.css sandstone.css simplex.css slate.css spacelab.css superhero.css united.css yeti.css)
5
5
  app.config.assets.paths << File.expand_path('../../../vendor/assets/fonts', __FILE__)
6
6
  end
7
7
  end
@@ -1,5 +1,6 @@
1
1
  module BootswatchRails
2
- VERSION = "3.2.0.13"
2
+ BOOTSTRAP = "3.2.0"
3
+ VERSION = "3.2.0.14"
3
4
  THEMES = [:amelia, :cerulean, :cosmo, :custom, :cyborg, :darkly, :flatly, :journal, :lumen, :paper, :readable, :sandstone, :simplex, :slate, :spacelab, :superhero, :united, :yeti]
4
5
  DEFAULT = 1
5
6
  end
@@ -47,7 +47,7 @@ class <%= column.camelize %>Uploader < CarrierWave::Uploader::Base
47
47
  process :resize_to_limit => [600, 600]
48
48
  end
49
49
  version :avatar do
50
- process :resize_to_limit => [350, 350]
50
+ process :resize_to_limit => [300, 300]
51
51
  end
52
52
 
53
53
  # Add a white list of extensions which are allowed to be uploaded.
@@ -2,22 +2,10 @@ module BootswatchRails
2
2
  module Generators
3
3
  class InstallGenerator < Rails::Generators::Base
4
4
  desc "Setup application to use bootswatch.com"
5
- class_option :bootstrap, type: :boolean, default: true,
6
- desc: 'Add bootstrap to application.js'
7
5
  class_option :turbolinks, type: :boolean, default: false,
8
6
  desc: 'Activate turbolinks (off by default)'
9
7
  source_root File.expand_path("../templates", __FILE__)
10
8
 
11
- def update_javascripts
12
- return unless options.bootstrap?
13
- file = "app/assets/javascripts/application.js"
14
- inject_into_file file, "\n//= require bootstrap", after: /require jquery_ujs$/
15
- unless options.turbolinks?
16
- gsub_file file, /^\/\/=( require turbolinks)/, "// \\1"
17
- comment_lines "Gemfile", /gem 'turbolinks/
18
- end
19
- end
20
-
21
9
  def update_application_controller
22
10
  file = "app/controllers/application_controller.rb"
23
11
  inject_into_file file, "\n\n private", after: /protect_from_forgery.*$/
@@ -42,10 +30,14 @@ module BootswatchRails
42
30
  directory "app", force: true
43
31
  directory "config"
44
32
  directory "lib", force: true
33
+ template "head.html.erb", "app/views/layouts/_head.html.erb"
45
34
  end
46
35
 
47
36
  def remove_turbolinks
48
37
  return if options.turbolinks?
38
+ comment_lines "Gemfile", /gem 'turbolinks/
39
+ file = "app/assets/javascripts/application.js"
40
+ gsub_file file, /^\/\/= require turbolinks\s/, ""
49
41
  file = "app/views/layouts/_head.html.erb"
50
42
  gsub_file file, /, 'data-turbolinks-track' => true/, ""
51
43
  end
@@ -0,0 +1,26 @@
1
+ <head>
2
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
3
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
4
+
5
+ <title><%%= content_for?(:title) ? yield(:title) : app_name %></title>
6
+
7
+ <%%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
8
+ <%%- if Rails.env.production? -%>
9
+ <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootswatch/<%= BootswatchRails::BOOTSTRAP %>/<%%= current_theme %>/bootstrap.min.css">
10
+ <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css">
11
+ <%%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
12
+ <script src="//maxcdn.bootstrapcdn.com/bootstrap/<%= BootswatchRails::BOOTSTRAP %>/js/bootstrap.min.js"></script>
13
+ <%%- else -%>
14
+ <%%= stylesheet_link_tag current_theme, 'data-turbolinks-track' => true %>
15
+ <%%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
16
+ <%%= javascript_include_tag 'bootstrap', 'data-turbolinks-track' => true %>
17
+ <%%- end -%>
18
+
19
+ <!--[if lt IE 9]>
20
+ <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
21
+ <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
22
+ <![endif]-->
23
+
24
+ <%%= csrf_meta_tags %>
25
+ </head>
26
+
@@ -13,9 +13,6 @@
13
13
  </td>
14
14
  <td>
15
15
  <%- if attribute.name.include?("picture") -%>
16
- <p>
17
- <%%= link_to "TODO: Anzeigen in Originalgröße", '#' %>
18
- </p>
19
16
  <%%= image_tag(@<%= singular_table_name %>.<%= attribute.name %>_url(:display)) %>
20
17
  <%- elsif attribute.type == :boolean -%>
21
18
  <%%= @<%= singular_table_name %>.<%= attribute.name %> ? t('simple_form.yes') : t('simple_form.no') %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootswatch_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0.13
4
+ version: 3.2.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volker Wiegand
@@ -104,7 +104,6 @@ files:
104
104
  - lib/generators/bootswatch_rails/install/templates/app/helpers/application_helper.rb
105
105
  - lib/generators/bootswatch_rails/install/templates/app/views/layouts/_flash.html.erb
106
106
  - lib/generators/bootswatch_rails/install/templates/app/views/layouts/_footer.html.erb
107
- - lib/generators/bootswatch_rails/install/templates/app/views/layouts/_head.html.erb
108
107
  - lib/generators/bootswatch_rails/install/templates/app/views/layouts/_navbar_left.html.erb
109
108
  - lib/generators/bootswatch_rails/install/templates/app/views/layouts/_navbar_right.html.erb
110
109
  - lib/generators/bootswatch_rails/install/templates/app/views/layouts/_sidebar.html.erb
@@ -115,6 +114,7 @@ files:
115
114
  - lib/generators/bootswatch_rails/install/templates/config/locales/scaffold.de.yml
116
115
  - lib/generators/bootswatch_rails/install/templates/config/locales/scaffold.en.yml
117
116
  - lib/generators/bootswatch_rails/install/templates/config/locales/simple_form.de.yml
117
+ - lib/generators/bootswatch_rails/install/templates/head.html.erb
118
118
  - lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/_form.html.erb
119
119
  - lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/edit.html.erb
120
120
  - lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/index.html.erb
@@ -1,19 +0,0 @@
1
- <head>
2
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
3
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
4
-
5
- <title><%= content_for?(:title) ? yield(:title) : app_name %></title>
6
-
7
- <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
8
- <%= stylesheet_link_tag current_theme, 'data-turbolinks-track' => true %>
9
-
10
- <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
11
-
12
- <!--[if lt IE 9]>
13
- <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
14
- <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
15
- <![endif]-->
16
-
17
- <%= csrf_meta_tags %>
18
- </head>
19
-