iqvoc 3.3.2 → 3.3.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.
data/CHANGELOG.md CHANGED
@@ -1,7 +1,15 @@
1
+ ## 3.3.3 (2012-01-13)
2
+
3
+ * Several asset pipeline related fixes
4
+ * Largely simplified heroku setup
5
+ * Improvements to engine mode
6
+
7
+ Detailed commit log: https://github.com/innoq/iqvoc/compare/v3.3.0...v3.3.3
8
+
1
9
  ## 3.3.0 (2012-01-10)
2
10
 
3
11
  * Rails 3.1
4
- * Asset pipeline
12
+ * Asset pipeline<br>
5
13
  [Detailed instructions](https://github.com/innoq/iqvoc/wiki/iQvoc-as-a-Rails-Engine)
6
14
  on how to use iQvoc as a Rails Engine (including the asset pipeline).
7
15
 
data/Gemfile CHANGED
@@ -37,6 +37,7 @@ group :development do
37
37
  gem 'capistrano'
38
38
  gem 'capistrano-ext'
39
39
  gem 'rvm' # RVM API (for capistrano deployments)
40
+ gem 'heroku'
40
41
  end
41
42
 
42
43
  group :development, :test do
@@ -61,7 +62,7 @@ group :test do
61
62
  gem 'turn'
62
63
  end
63
64
 
64
- group :production, :production_internal do
65
+ group :production do
65
66
  platforms :ruby do
66
67
  gem 'sqlite3'
67
68
  end
@@ -70,3 +71,7 @@ group :production, :production_internal do
70
71
  gem 'activerecord-oracle_enhanced-adapter'
71
72
  end
72
73
  end
74
+
75
+ group :heroku do
76
+ gem 'pg'
77
+ end
data/Gemfile.lock CHANGED
@@ -29,6 +29,7 @@ GEM
29
29
  activesupport (= 3.1.3)
30
30
  activesupport (3.1.3)
31
31
  multi_json (~> 1.0)
32
+ addressable (2.2.6)
32
33
  ansi (1.4.1)
33
34
  arel (2.2.1)
34
35
  authlogic (3.1.0)
@@ -54,7 +55,7 @@ GEM
54
55
  xpath (~> 0.1.4)
55
56
  capybara-webkit (0.7.2)
56
57
  capybara (>= 1.0.0, < 1.2)
57
- childprocess (0.2.8)
58
+ childprocess (0.2.9)
58
59
  ffi (~> 1.0.6)
59
60
  database_cleaner (0.7.0)
60
61
  erubis (2.7.0)
@@ -66,6 +67,11 @@ GEM
66
67
  factory_girl (~> 2.3.0)
67
68
  railties (>= 3.0.0)
68
69
  ffi (1.0.11)
70
+ heroku (2.18.1)
71
+ launchy (>= 0.3.2)
72
+ rest-client (~> 1.6.1)
73
+ rubyzip
74
+ term-ansicolor (~> 1.0.5)
69
75
  highline (1.6.9)
70
76
  hike (1.2.1)
71
77
  i18n (0.6.0)
@@ -77,6 +83,8 @@ GEM
77
83
  actionpack (>= 3.0.0)
78
84
  activesupport (>= 3.0.0)
79
85
  railties (>= 3.0.0)
86
+ launchy (2.0.5)
87
+ addressable (~> 2.2.6)
80
88
  mail (2.3.0)
81
89
  i18n (>= 0.4.0)
82
90
  mime-types (~> 1.16)
@@ -89,10 +97,11 @@ GEM
89
97
  net-ssh (>= 1.99.1)
90
98
  net-sftp (2.0.5)
91
99
  net-ssh (>= 2.0.9)
92
- net-ssh (2.2.2)
100
+ net-ssh (2.3.0)
93
101
  net-ssh-gateway (1.1.0)
94
102
  net-ssh (>= 1.99.1)
95
103
  nokogiri (1.5.0)
104
+ pg (0.12.2)
96
105
  polyglot (0.3.3)
97
106
  rack (1.3.6)
98
107
  rack-cache (1.1)
@@ -123,6 +132,8 @@ GEM
123
132
  rake (0.9.2.2)
124
133
  rdoc (3.12)
125
134
  json (~> 1.4)
135
+ rest-client (1.6.7)
136
+ mime-types (>= 1.16)
126
137
  rubyzip (0.9.5)
127
138
  rvm (1.9.2)
128
139
  selenium-webdriver (2.16.0)
@@ -135,6 +146,7 @@ GEM
135
146
  rack (~> 1.0)
136
147
  tilt (~> 1.1, != 1.3.0)
137
148
  sqlite3 (1.3.5)
149
+ term-ansicolor (1.0.7)
138
150
  thor (0.14.6)
139
151
  tilt (1.3.3)
140
152
  treetop (1.4.10)
@@ -165,12 +177,14 @@ DEPENDENCIES
165
177
  capybara-webkit
166
178
  database_cleaner
167
179
  factory_girl_rails
180
+ heroku
168
181
  iq_rdf (~> 0.1.0)
169
182
  json
170
183
  kaminari
171
184
  memory_test_fix
172
185
  mysql2
173
186
  nokogiri (~> 1.5.0)
187
+ pg
174
188
  rails (= 3.1.3)
175
189
  rails_autolink
176
190
  rvm
data/README.md CHANGED
@@ -20,16 +20,39 @@ iQvoc provides comprehensive functionality for all aspects of managing such voca
20
20
 
21
21
  iQvoc is built with state-of-the-art technology and can be easily customized according to user's needs.
22
22
 
23
- ## Getting Started
23
+ ## Setup
24
+
25
+ ### Heroku
26
+
27
+ You can easily setup your iQvoc instance in under 5 minutes, we wanted to make this process really easy.
28
+
29
+ To run iQvoc on heroku do the following:
30
+
31
+ ```
32
+ bundle install
33
+ heroku create
34
+ bundle exec rake heroku:config
35
+ git push heroku master
36
+ heroku rake db:migrate
37
+ heroku rake db:seed
38
+ ```
39
+
40
+ `heroku open` opens your app in the browser.
41
+
42
+ Remember to visit the Users section and change the default passwords!
43
+
44
+ **Remarks:**
45
+ For now iQvoc only supports the standard Bamboo stack. Cedar is not supported as we have `sqlite3` as a dependency
46
+ in the Gemfile and Cedar does not support a custom `BUNDLE_WITHOUT` config like Bamboo at the moment.
47
+
48
+ ### Custom
24
49
 
25
50
  1. Configure your database via `config/database.template.yml`. Don't forget to rename it to `database.yml`
26
51
  2. Run `bundle install`
27
52
  3. Run `bundle exec rake db:create` to create the database
28
53
  4. Create the necessary tables by running `rake db:migrate`
29
54
  5. Load some base data by running `rake db:seed`
30
- 6. Create `config/initializers/secret_token.rb` based on
31
- `config/initializers/secret_token.rb.template`, filling in the secret token
32
- generated by `bundle exec rake secret`
55
+ 6. Run `bundle exec rake setup:generate_secret_token`
33
56
  7. Boot up the app using `bundle exec rails s` (or `passenger start` if you use passenger)
34
57
  8. Log in with "admin@iqvoc" / "admin" or "demo@iqvoc" / "cooluri" (cf. step #5)
35
58
  9. Visit the Users section and change the default passwords
@@ -20,7 +20,7 @@ require 'rails/all'
20
20
 
21
21
  if defined?(Bundler)
22
22
  # If you precompile assets before deploying to production, use this line
23
- Bundler.require *Rails.groups(:assets => %w(development test))
23
+ Bundler.require(:heroku, *Rails.groups(:assets => %w(development test)))
24
24
  # If you want your assets lazily compiled in production, use this line
25
25
  # Bundler.require(:default, :assets, Rails.env)
26
26
  end
@@ -0,0 +1,52 @@
1
+ # encoding: UTF-8
2
+
3
+ # Copyright 2011 innoQ Deutschland GmbH
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ if Iqvoc.const_defined?(:Application)
18
+ Iqvoc::Application.configure do
19
+ # Settings specified here will take precedence over those in config/environment.rb
20
+
21
+ # The production environment is meant for finished, "live" apps.
22
+ # Code is not reloaded between requests
23
+ config.cache_classes = true
24
+
25
+ # Full error reports are disabled and caching is turned on
26
+ config.consider_all_requests_local = false
27
+ config.action_controller.perform_caching = true
28
+
29
+ # Specifies the header that your server uses for sending files
30
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile"
31
+
32
+ # Disable Rails's static asset server
33
+ # In production, Apache or nginx will already do this
34
+ config.serve_static_assets = true
35
+
36
+ # Compress JavaScripts and CSS
37
+ config.assets.compress = false
38
+
39
+ # Don't fallback to assets pipeline if a precompiled asset is missed
40
+ config.assets.compile = true
41
+
42
+ # Generate digests for assets URLs
43
+ config.assets.digest = false
44
+
45
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
46
+ # the I18n.default_locale when a translation can not be found)
47
+ config.i18n.fallbacks = true
48
+
49
+ # Send deprecation notices to registered listeners
50
+ config.active_support.deprecation = :notify
51
+ end
52
+ end
@@ -25,6 +25,6 @@ if Iqvoc.const_defined?(:Application)
25
25
 
26
26
  # Run `rake secret` and uncomment the following line
27
27
  # Replace the secret-placeholder with your generated token
28
- Iqvoc::Application.config.secret_token = 'b8d90f50515345071ea3a8fced203bfac91c734afda36bbe4a51a630cc11f1d7b99d6d6da19d6bc0aa2c636d46da87159cd53661ed6d98bbc5af30d72410e1a6'
28
+ Iqvoc::Application.config.secret_token = '175128c5b4a40cfd8b1db1ab15606e20a2263346eca7a1f89b5e06bea6f1d822ac794262642605b53c8c632062826799726e348f383d6b88c19eb93a60c75948'
29
29
 
30
30
  end
@@ -14,11 +14,16 @@
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
16
 
17
- # This file was generated by the "jdbc" generator, which is provided
18
- # by the activerecord-jdbc-adapter gem.
19
- #
20
- # This file allows you to use Rails' various db:* tasks with JDBC.
21
- # if defined?(JRUBY_VERSION)
22
- # require 'jdbc_adapter'
23
- # require 'jdbc_adapter/rake_tasks'
24
- # end
17
+ # Be sure to restart your server when you modify this file.
18
+
19
+ if Iqvoc.const_defined?(:Application)
20
+
21
+ if ENV['HEROKU']
22
+ puts 'heroku app detected; using session secret from config vars...'
23
+ Rails.application.config.secret_token = ENV['SECRET_TOKEN']
24
+ elsif !File.exists?(Rails.root.join('config', 'initializers', 'secret_token.rb'))
25
+ system "bundle exec rake setup:generate_secret_token"
26
+ require Rails.root.join('config', 'initializers', 'secret_token.rb')
27
+ end
28
+
29
+ end
@@ -4,7 +4,7 @@ namespace :iqvoc do
4
4
  desc "Migrate the database through scripts in db/migrate and update db/schema.rb by invoking db:schema:dump. Target specific version with VERSION=x. Turn off output with VERBOSE=false."
5
5
  task :migrate => :environment do
6
6
  ActiveRecord::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
7
- ActiveRecord::Migrator.migrate(Iqvoc::Engine.find_root_with_flag("db").join('db/migrate'), ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
7
+ ActiveRecord::Migrator.migrate(Iqvoc::Engine.find_root_with_flag("db").join("db/migrate"), ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
8
8
  Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
9
9
  end
10
10
 
@@ -13,9 +13,9 @@ namespace :iqvoc do
13
13
  task :migrate_all => :environment do
14
14
  ActiveRecord::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
15
15
  paths = Rails.application.config.paths["db/migrate"].existent +
16
- Rails.application.railties.engines.
17
- map { |e| e.config.paths["db/migrate"] && e.config.paths["db/migrate"].existent }.
18
- flatten.compact
16
+ Rails.application.railties.engines.
17
+ map { |e| e.config.paths["db/migrate"] && e.config.paths["db/migrate"].existent }.
18
+ flatten.compact
19
19
 
20
20
  puts "Migrating from: " + paths.join(", ")
21
21
  ActiveRecord::Migrator.migrate(paths, ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
@@ -35,7 +35,7 @@ namespace :iqvoc do
35
35
  }
36
36
 
37
37
  engines.select{|e| e.engine_name !~ /^iqvoc_/}.each do |engine|
38
- puts "There is a non iqvoc engine (#{engine.engine_name}) having seeds. This seeds areare not necessary idemprotent."
38
+ puts "There is a non-iQvoc engine (#{engine.engine_name}) having seeds. These seeds are not necessarily idemprotent."
39
39
  puts "Do you with to (c)ontinue, (i)gnore it or (a)bort?"
40
40
  input = nil
41
41
  while input !~ /^[cia]$/
data/lib/iqvoc/version.rb CHANGED
@@ -15,5 +15,5 @@
15
15
  # limitations under the License.
16
16
 
17
17
  module Iqvoc
18
- VERSION = "3.3.2"
18
+ VERSION = "3.3.3"
19
19
  end
@@ -0,0 +1,14 @@
1
+ namespace :heroku do
2
+ task :config do
3
+ require 'securerandom'
4
+
5
+ HEROKU_CONFIG = %W(
6
+ HEROKU=true
7
+ RACK_ENV=heroku
8
+ RAILS_ENV=heroku
9
+ SECRET_TOKEN=#{SecureRandom.hex(64)}
10
+ )
11
+
12
+ system "heroku config:add #{HEROKU_CONFIG.join(' ')}"
13
+ end
14
+ end
@@ -0,0 +1,20 @@
1
+ namespace :setup do
2
+ task :generate_secret_token do
3
+ require 'securerandom'
4
+
5
+ template = Rails.root.join("config", "initializers", "secret_token.rb.template")
6
+ raise "File not found: #{template}" unless File.exist?(template)
7
+
8
+ file_name = "config/initializers/secret_token.rb"
9
+
10
+ token = SecureRandom.hex(64)
11
+ txt = File.read(template)
12
+ txt.gsub!("S-E-C-R-E-T", token)
13
+
14
+ File.open(file_name, "w") do |f|
15
+ f.write txt
16
+ end
17
+
18
+ puts "Secret token configuration has been created in #{file_name}."
19
+ end
20
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iqvoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.2
4
+ version: 3.3.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-01-12 00:00:00.000000000 Z
14
+ date: 2012-01-13 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
18
- requirement: &70277083650720 !ruby/object:Gem::Requirement
18
+ requirement: &70173094141340 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ~>
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: 3.1.3
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *70277083650720
26
+ version_requirements: *70173094141340
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
- requirement: &70277083650320 !ruby/object:Gem::Requirement
29
+ requirement: &70173094140940 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ! '>='
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: '0'
35
35
  type: :runtime
36
36
  prerelease: false
37
- version_requirements: *70277083650320
37
+ version_requirements: *70173094140940
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: kaminari
40
- requirement: &70277083649860 !ruby/object:Gem::Requirement
40
+ requirement: &70173094140480 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ! '>='
@@ -45,10 +45,10 @@ dependencies:
45
45
  version: '0'
46
46
  type: :runtime
47
47
  prerelease: false
48
- version_requirements: *70277083649860
48
+ version_requirements: *70173094140480
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: authlogic
51
- requirement: &70277083649440 !ruby/object:Gem::Requirement
51
+ requirement: &70173094140060 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ! '>='
@@ -56,10 +56,10 @@ dependencies:
56
56
  version: '0'
57
57
  type: :runtime
58
58
  prerelease: false
59
- version_requirements: *70277083649440
59
+ version_requirements: *70173094140060
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: cancan
62
- requirement: &70277083649020 !ruby/object:Gem::Requirement
62
+ requirement: &70173094139640 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
65
65
  - - ! '>='
@@ -67,10 +67,10 @@ dependencies:
67
67
  version: '0'
68
68
  type: :runtime
69
69
  prerelease: false
70
- version_requirements: *70277083649020
70
+ version_requirements: *70173094139640
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: iq_rdf
73
- requirement: &70277094723180 !ruby/object:Gem::Requirement
73
+ requirement: &70173094139140 !ruby/object:Gem::Requirement
74
74
  none: false
75
75
  requirements:
76
76
  - - ~>
@@ -78,10 +78,10 @@ dependencies:
78
78
  version: 0.1.0
79
79
  type: :runtime
80
80
  prerelease: false
81
- version_requirements: *70277094723180
81
+ version_requirements: *70173094139140
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: json
84
- requirement: &70277083680180 !ruby/object:Gem::Requirement
84
+ requirement: &70173094138720 !ruby/object:Gem::Requirement
85
85
  none: false
86
86
  requirements:
87
87
  - - ! '>='
@@ -89,10 +89,10 @@ dependencies:
89
89
  version: '0'
90
90
  type: :runtime
91
91
  prerelease: false
92
- version_requirements: *70277083680180
92
+ version_requirements: *70173094138720
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: rails_autolink
95
- requirement: &70277083679720 !ruby/object:Gem::Requirement
95
+ requirement: &70173094138260 !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
98
98
  - - ! '>='
@@ -100,7 +100,7 @@ dependencies:
100
100
  version: '0'
101
101
  type: :runtime
102
102
  prerelease: false
103
- version_requirements: *70277083679720
103
+ version_requirements: *70173094138260
104
104
  description: iQvoc - a SKOS(-XL) vocabulary management system built on the Semantic
105
105
  Web
106
106
  email:
@@ -303,6 +303,7 @@ files:
303
303
  - config/engine.rb
304
304
  - config/environment.rb
305
305
  - config/environments/development.rb
306
+ - config/environments/heroku.rb
306
307
  - config/environments/production.rb
307
308
  - config/environments/test.rb
308
309
  - config/initializers/action_view.rb
@@ -316,6 +317,7 @@ files:
316
317
  - config/initializers/mime_types.rb
317
318
  - config/initializers/secret_token.rb
318
319
  - config/initializers/secret_token.rb.template
320
+ - config/initializers/secret_token_configurator.rb
319
321
  - config/initializers/session_store.rb
320
322
  - config/locales/activerecord.de.yml
321
323
  - config/locales/activerecord.en.yml
@@ -542,8 +544,9 @@ files:
542
544
  - lib/maker.rb
543
545
  - lib/ojdbc14.jar
544
546
  - lib/string.rb
547
+ - lib/tasks/heroku.rake
545
548
  - lib/tasks/importer.rake
546
- - lib/tasks/jdbc.rake
549
+ - lib/tasks/setup.rake
547
550
  - test/factories.rb
548
551
  - test/integration/alphabetical_test.rb
549
552
  - test/integration/authentication_test.rb