bootsy-rails3 2.0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/MIT-LICENSE +20 -0
- data/README.md +155 -0
- data/Rakefile +38 -0
- data/app/assets/images/bootsy/gallery-loader.gif +0 -0
- data/app/assets/images/bootsy/upload-loader.gif +0 -0
- data/app/assets/javascripts/bootsy.js +8 -0
- data/app/assets/javascripts/bootsy/bootstrap-wysihtml5.js +530 -0
- data/app/assets/javascripts/bootsy/bootstrap.file-input.js +122 -0
- data/app/assets/javascripts/bootsy/bootsy.js +305 -0
- data/app/assets/javascripts/bootsy/editor_options.js +80 -0
- data/app/assets/javascripts/bootsy/init.js +31 -0
- data/app/assets/javascripts/bootsy/locales/bootstrap-wysihtml5.pt-BR.js +50 -0
- data/app/assets/javascripts/bootsy/locales/bootsy.pt-BR.js +9 -0
- data/app/assets/javascripts/bootsy/translations.js +8 -0
- data/app/assets/javascripts/bootsy/wysihtml5.js +9564 -0
- data/app/assets/stylesheets/bootsy.css +3 -0
- data/app/assets/stylesheets/bootsy/bootstrap-submenu.css +47 -0
- data/app/assets/stylesheets/bootsy/bootstrap-wysihtml5.css +102 -0
- data/app/assets/stylesheets/bootsy/bootsy.css +161 -0
- data/app/controllers/bootsy/application_controller.rb +7 -0
- data/app/controllers/bootsy/images_controller.rb +80 -0
- data/app/helpers/bootsy/application_helper.rb +11 -0
- data/app/uploaders/bootsy/image_uploader.rb +35 -0
- data/app/views/bootsy/images/_image.html.erb +43 -0
- data/app/views/bootsy/images/_modal.html.erb +28 -0
- data/app/views/bootsy/images/_new.html.erb +8 -0
- data/config/cucumber.yml +8 -0
- data/config/locales/en.yml +27 -0
- data/config/locales/pt-BR.yml +27 -0
- data/config/routes.rb +11 -0
- data/db/migrate/20120624171333_create_bootsy_images.rb +9 -0
- data/db/migrate/20120628124845_create_bootsy_image_galleries.rb +8 -0
- data/lib/bootsy-rails3.rb +66 -0
- data/lib/bootsy/activerecord/image.rb +11 -0
- data/lib/bootsy/activerecord/image_gallery.rb +8 -0
- data/lib/bootsy/container.rb +31 -0
- data/lib/bootsy/core_ext.rb +2 -0
- data/lib/bootsy/engine.rb +31 -0
- data/lib/bootsy/form_builder.rb +7 -0
- data/lib/bootsy/form_helper.rb +68 -0
- data/lib/bootsy/simple_form/bootsy_input.rb +11 -0
- data/lib/bootsy/version.rb +3 -0
- data/lib/generators/bootsy/USAGE +12 -0
- data/lib/generators/bootsy/install_generator.rb +50 -0
- data/lib/generators/bootsy/templates/bootsy.rb +64 -0
- data/lib/tasks/bootsy_tasks.rake +4 -0
- data/lib/tasks/cucumber.rake +65 -0
- metadata +137 -0
@@ -0,0 +1,50 @@
|
|
1
|
+
module Bootsy
|
2
|
+
module Generators
|
3
|
+
class InstallGenerator < Rails::Generators::Base
|
4
|
+
source_root __FILE__
|
5
|
+
|
6
|
+
def add_routes
|
7
|
+
route("mount Bootsy::Engine => '/bootsy', as: 'bootsy'")
|
8
|
+
end
|
9
|
+
|
10
|
+
def copy_locale
|
11
|
+
copy_file('../../../../config/locales/en.yml', 'config/locales/bootsy.en.yml')
|
12
|
+
end
|
13
|
+
|
14
|
+
def add_assets
|
15
|
+
[
|
16
|
+
{
|
17
|
+
original: 'app/assets/javascripts/application.js',
|
18
|
+
skip_if: 'require bootsy',
|
19
|
+
content: "\n//= require bootsy",
|
20
|
+
position: {
|
21
|
+
after: '//= require jquery_ujs'
|
22
|
+
}
|
23
|
+
},
|
24
|
+
{
|
25
|
+
original: 'app/assets/stylesheets/application.css',
|
26
|
+
skip_if: 'require bootsy',
|
27
|
+
content: "\n *= require bootsy",
|
28
|
+
position: {
|
29
|
+
after: '*= require_self'
|
30
|
+
}
|
31
|
+
}
|
32
|
+
].each do |params|
|
33
|
+
if File.exists?(params[:original])
|
34
|
+
if File.binread(params[:original]).include?(params[:skip_if])
|
35
|
+
say_status('skipped', "insert into #{params[:original]}", :yellow)
|
36
|
+
else
|
37
|
+
insert_into_file(params[:original], params[:content], params[:position])
|
38
|
+
end
|
39
|
+
else
|
40
|
+
say_status('not found', "#{params[:original]} not found. You must manually require Bootsy in your assets pipeline.", :red)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def copy_config
|
46
|
+
template('../templates/bootsy.rb', 'config/initializers/bootsy.rb')
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# Use this setup block to configure all options available in Bootsy.
|
2
|
+
Bootsy.setup do |config|
|
3
|
+
# Default editor options
|
4
|
+
# You can override them locally by passing an editor_options hash to bootsy_area
|
5
|
+
# config.editor_options = {
|
6
|
+
# font_styles: true,
|
7
|
+
# emphasis: true,
|
8
|
+
# lists: true,
|
9
|
+
# html: false,
|
10
|
+
# link: true,
|
11
|
+
# image: true,
|
12
|
+
# color: true
|
13
|
+
# }
|
14
|
+
|
15
|
+
# Image versions available
|
16
|
+
# Possible values: :small, :medium, :large and/or :original
|
17
|
+
config.image_versions_available = [:small, :medium, :large, :original]
|
18
|
+
|
19
|
+
|
20
|
+
# SMALL IMAGES
|
21
|
+
|
22
|
+
# Width limit for small images
|
23
|
+
# config.small_image[:width] = 160
|
24
|
+
|
25
|
+
# Height limit for small images
|
26
|
+
# config.small_image[:height] = 160
|
27
|
+
|
28
|
+
|
29
|
+
# MEDIUM IMAGES
|
30
|
+
|
31
|
+
# Width limit for medium images
|
32
|
+
# config.medium_image[:width] = 360
|
33
|
+
|
34
|
+
# Height limit for medium images
|
35
|
+
# config.medium_image[:height] = 360
|
36
|
+
|
37
|
+
|
38
|
+
# LARGE IMAGES
|
39
|
+
|
40
|
+
# Width limit for large images
|
41
|
+
# config.large_image[:width] = 760
|
42
|
+
|
43
|
+
# Height limit for large images
|
44
|
+
# config.large_image[:height] = 760
|
45
|
+
|
46
|
+
|
47
|
+
# Whether user can destroy uploaded files
|
48
|
+
# config.allow_destroy = true
|
49
|
+
|
50
|
+
|
51
|
+
# Storage mode
|
52
|
+
# You can change the sorage mode below from :file to :fog if you want
|
53
|
+
# to use Amazon S3 and other cloud services. If you do that, please add
|
54
|
+
# 'fog' to your Gemfile and create and configure your credentials in an
|
55
|
+
# initializer file, as described in Carrierwave's docs:
|
56
|
+
# https://github.com/carrierwaveuploader/carrierwave/blob/master/README.md#using-amazon-s3
|
57
|
+
#
|
58
|
+
# config.storage = :file
|
59
|
+
|
60
|
+
|
61
|
+
# Store directory (inside 'public') for storage = :file
|
62
|
+
# BE CAREFUL! Changing this may break previously uploaded file paths!
|
63
|
+
# config.store_dir = 'uploads'
|
64
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
|
2
|
+
# It is recommended to regenerate this file in the future when you upgrade to a
|
3
|
+
# newer version of cucumber-rails. Consider adding your own code to a new file
|
4
|
+
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
|
5
|
+
# files.
|
6
|
+
|
7
|
+
|
8
|
+
unless ARGV.any? {|a| a =~ /^gems/} # Don't load anything when running the gems:* tasks
|
9
|
+
|
10
|
+
vendored_cucumber_bin = Dir["#{Rails.root}/vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
|
11
|
+
$LOAD_PATH.unshift(File.dirname(vendored_cucumber_bin) + '/../lib') unless vendored_cucumber_bin.nil?
|
12
|
+
|
13
|
+
begin
|
14
|
+
require 'cucumber/rake/task'
|
15
|
+
|
16
|
+
namespace :cucumber do
|
17
|
+
Cucumber::Rake::Task.new({:ok => 'db:test:prepare'}, 'Run features that should pass') do |t|
|
18
|
+
t.binary = vendored_cucumber_bin # If nil, the gem's binary is used.
|
19
|
+
t.fork = true # You may get faster startup if you set this to false
|
20
|
+
t.profile = 'default'
|
21
|
+
end
|
22
|
+
|
23
|
+
Cucumber::Rake::Task.new({:wip => 'db:test:prepare'}, 'Run features that are being worked on') do |t|
|
24
|
+
t.binary = vendored_cucumber_bin
|
25
|
+
t.fork = true # You may get faster startup if you set this to false
|
26
|
+
t.profile = 'wip'
|
27
|
+
end
|
28
|
+
|
29
|
+
Cucumber::Rake::Task.new({:rerun => 'db:test:prepare'}, 'Record failing features and run only them if any exist') do |t|
|
30
|
+
t.binary = vendored_cucumber_bin
|
31
|
+
t.fork = true # You may get faster startup if you set this to false
|
32
|
+
t.profile = 'rerun'
|
33
|
+
end
|
34
|
+
|
35
|
+
desc 'Run all features'
|
36
|
+
task :all => [:ok, :wip]
|
37
|
+
|
38
|
+
task :statsetup do
|
39
|
+
require 'rails/code_statistics'
|
40
|
+
::STATS_DIRECTORIES << %w(Cucumber\ features features) if File.exist?('features')
|
41
|
+
::CodeStatistics::TEST_TYPES << "Cucumber features" if File.exist?('features')
|
42
|
+
end
|
43
|
+
end
|
44
|
+
desc 'Alias for cucumber:ok'
|
45
|
+
task :cucumber => 'cucumber:ok'
|
46
|
+
|
47
|
+
task :default => :cucumber
|
48
|
+
|
49
|
+
task :features => :cucumber do
|
50
|
+
STDERR.puts "*** The 'features' task is deprecated. See rake -T cucumber ***"
|
51
|
+
end
|
52
|
+
|
53
|
+
# In case we don't have ActiveRecord, append a no-op task that we can depend upon.
|
54
|
+
task 'db:test:prepare' do
|
55
|
+
end
|
56
|
+
|
57
|
+
task :stats => 'cucumber:statsetup'
|
58
|
+
rescue LoadError
|
59
|
+
desc 'cucumber rake task not available (cucumber not installed)'
|
60
|
+
task :cucumber do
|
61
|
+
abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
metadata
ADDED
@@ -0,0 +1,137 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bootsy-rails3
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.5.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Volmer Soares
|
8
|
+
- Marcin Lewandowski
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-02-01 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: mini_magick
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ~>
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 3.7.0
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ~>
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 3.7.0
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: carrierwave
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ~>
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 0.9.0
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ~>
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 0.9.0
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: remotipart
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ~>
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: 1.2.1
|
49
|
+
type: :runtime
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ~>
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 1.2.1
|
56
|
+
description: A beautiful WYSIWYG editor with image uploads for Rails (backported to
|
57
|
+
Rails 3).
|
58
|
+
email:
|
59
|
+
- volmerius@gmail.com
|
60
|
+
- marcin@saepia.net
|
61
|
+
executables: []
|
62
|
+
extensions: []
|
63
|
+
extra_rdoc_files: []
|
64
|
+
files:
|
65
|
+
- app/uploaders/bootsy/image_uploader.rb
|
66
|
+
- app/views/bootsy/images/_image.html.erb
|
67
|
+
- app/views/bootsy/images/_modal.html.erb
|
68
|
+
- app/views/bootsy/images/_new.html.erb
|
69
|
+
- app/controllers/bootsy/application_controller.rb
|
70
|
+
- app/controllers/bootsy/images_controller.rb
|
71
|
+
- app/helpers/bootsy/application_helper.rb
|
72
|
+
- app/assets/stylesheets/bootsy/bootstrap-submenu.css
|
73
|
+
- app/assets/stylesheets/bootsy/bootsy.css
|
74
|
+
- app/assets/stylesheets/bootsy/bootstrap-wysihtml5.css
|
75
|
+
- app/assets/stylesheets/bootsy.css
|
76
|
+
- app/assets/images/bootsy/gallery-loader.gif
|
77
|
+
- app/assets/images/bootsy/upload-loader.gif
|
78
|
+
- app/assets/javascripts/bootsy/translations.js
|
79
|
+
- app/assets/javascripts/bootsy/wysihtml5.js
|
80
|
+
- app/assets/javascripts/bootsy/locales/bootstrap-wysihtml5.pt-BR.js
|
81
|
+
- app/assets/javascripts/bootsy/locales/bootsy.pt-BR.js
|
82
|
+
- app/assets/javascripts/bootsy/bootstrap.file-input.js
|
83
|
+
- app/assets/javascripts/bootsy/editor_options.js
|
84
|
+
- app/assets/javascripts/bootsy/init.js
|
85
|
+
- app/assets/javascripts/bootsy/bootsy.js
|
86
|
+
- app/assets/javascripts/bootsy/bootstrap-wysihtml5.js
|
87
|
+
- app/assets/javascripts/bootsy.js
|
88
|
+
- config/locales/pt-BR.yml
|
89
|
+
- config/locales/en.yml
|
90
|
+
- config/routes.rb
|
91
|
+
- config/cucumber.yml
|
92
|
+
- db/migrate/20120624171333_create_bootsy_images.rb
|
93
|
+
- db/migrate/20120628124845_create_bootsy_image_galleries.rb
|
94
|
+
- lib/bootsy/activerecord/image.rb
|
95
|
+
- lib/bootsy/activerecord/image_gallery.rb
|
96
|
+
- lib/bootsy/engine.rb
|
97
|
+
- lib/bootsy/version.rb
|
98
|
+
- lib/bootsy/simple_form/bootsy_input.rb
|
99
|
+
- lib/bootsy/form_helper.rb
|
100
|
+
- lib/bootsy/form_builder.rb
|
101
|
+
- lib/bootsy/container.rb
|
102
|
+
- lib/bootsy/core_ext.rb
|
103
|
+
- lib/generators/bootsy/templates/bootsy.rb
|
104
|
+
- lib/generators/bootsy/USAGE
|
105
|
+
- lib/generators/bootsy/install_generator.rb
|
106
|
+
- lib/bootsy-rails3.rb
|
107
|
+
- lib/tasks/cucumber.rake
|
108
|
+
- lib/tasks/bootsy_tasks.rake
|
109
|
+
- MIT-LICENSE
|
110
|
+
- Rakefile
|
111
|
+
- README.md
|
112
|
+
homepage: http://github.com/volmer/bootsy
|
113
|
+
licenses:
|
114
|
+
- MIT
|
115
|
+
metadata: {}
|
116
|
+
post_install_message:
|
117
|
+
rdoc_options: []
|
118
|
+
require_paths:
|
119
|
+
- lib
|
120
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ! '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ! '>='
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
130
|
+
requirements: []
|
131
|
+
rubyforge_project:
|
132
|
+
rubygems_version: 2.1.11
|
133
|
+
signing_key:
|
134
|
+
specification_version: 4
|
135
|
+
summary: A beautiful WYSIWYG editor with image uploads for Rails (backported to Rails
|
136
|
+
3).
|
137
|
+
test_files: []
|