aloha-rails 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,10 +5,10 @@ module Aloha
5
5
  module Helpers
6
6
  def aloha_script_tag(options={})
7
7
  options = {
8
- type: 'text/javascript',
9
- src: '/assets/aloha/lib/aloha.js',
10
- plugins: Aloha::Rails.default_plugins,
11
- extra_plugins: []
8
+ :type => 'text/javascript',
9
+ :src => '/assets/aloha/lib/aloha.js',
10
+ :plugins => Aloha::Rails.default_plugins,
11
+ :extra_plugins => []
12
12
  }.update(options)
13
13
 
14
14
  plugins = options.delete(:plugins) || []
@@ -1,5 +1,5 @@
1
1
  module Aloha
2
2
  module Rails
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -22,4 +22,13 @@ class Aloha::InstallGenerator < Rails::Generators::Base
22
22
  copy_file "application.js", appjs
23
23
  end
24
24
  end
25
+
26
+ def load_stylesheet
27
+ appcss = File.join "app", "assets", "stylesheets", "application.css"
28
+ if File.exist? appcss
29
+ insert_into_file appcss, " *= require aloha-config\n", :after => "require_self\n"
30
+ else
31
+ copy_file "application.css", appcss
32
+ end
33
+ end
25
34
  end
@@ -0,0 +1,14 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require aloha
13
+ *= require_tree .
14
+ */
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aloha-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-01-31 00:00:00.000000000 Z
13
+ date: 2012-10-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
17
- requirement: &70137887852580 !ruby/object:Gem::Requirement
17
+ requirement: !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,15 @@ dependencies:
22
22
  version: '3.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70137887852580
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ~>
29
+ - !ruby/object:Gem::Version
30
+ version: '3.0'
26
31
  - !ruby/object:Gem::Dependency
27
32
  name: jquery-rails
28
- requirement: &70137887852060 !ruby/object:Gem::Requirement
33
+ requirement: !ruby/object:Gem::Requirement
29
34
  none: false
30
35
  requirements:
31
36
  - - ~>
@@ -33,10 +38,15 @@ dependencies:
33
38
  version: '2.0'
34
39
  type: :runtime
35
40
  prerelease: false
36
- version_requirements: *70137887852060
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ~>
45
+ - !ruby/object:Gem::Version
46
+ version: '2.0'
37
47
  - !ruby/object:Gem::Dependency
38
48
  name: rspec-rails
39
- requirement: &70137887851580 !ruby/object:Gem::Requirement
49
+ requirement: !ruby/object:Gem::Requirement
40
50
  none: false
41
51
  requirements:
42
52
  - - ~>
@@ -44,7 +54,12 @@ dependencies:
44
54
  version: '2.8'
45
55
  type: :development
46
56
  prerelease: false
47
- version_requirements: *70137887851580
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ~>
61
+ - !ruby/object:Gem::Version
62
+ version: '2.8'
48
63
  description: aloha-editor in Rails 3
49
64
  email:
50
65
  - ovelar@gmail.com
@@ -69,6 +84,7 @@ files:
69
84
  - lib/generators/aloha/install/templates/aloha-config.coffee
70
85
  - lib/generators/aloha/install/templates/aloha-config.js
71
86
  - lib/generators/aloha/install/templates/aloha.rb
87
+ - lib/generators/aloha/install/templates/application.css
72
88
  - lib/generators/aloha/install/templates/application.js
73
89
  - spec/aloha_spec.rb
74
90
  - spec/helpers/aloha_helpers_spec.rb
@@ -1109,21 +1125,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
1109
1125
  - - ! '>='
1110
1126
  - !ruby/object:Gem::Version
1111
1127
  version: '0'
1112
- segments:
1113
- - 0
1114
- hash: 2976565234422338570
1115
1128
  required_rubygems_version: !ruby/object:Gem::Requirement
1116
1129
  none: false
1117
1130
  requirements:
1118
1131
  - - ! '>='
1119
1132
  - !ruby/object:Gem::Version
1120
1133
  version: '0'
1121
- segments:
1122
- - 0
1123
- hash: 2976565234422338570
1124
1134
  requirements: []
1125
1135
  rubyforge_project:
1126
- rubygems_version: 1.8.11
1136
+ rubygems_version: 1.8.24
1127
1137
  signing_key:
1128
1138
  specification_version: 3
1129
1139
  summary: Provides the aloha-editor for your rails3 app
@@ -1131,3 +1141,4 @@ test_files:
1131
1141
  - spec/aloha_spec.rb
1132
1142
  - spec/helpers/aloha_helpers_spec.rb
1133
1143
  - spec/spec_helper.rb
1144
+ has_rdoc: