decidim 0.0.1.alpha2 → 0.0.1.alpha3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim might be problematic. Click here for more details.

Files changed (166) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +8 -2
  3. data/.dockerignore +5 -0
  4. data/.gitignore +2 -1
  5. data/.hound.yml +4 -0
  6. data/.rubocop.yml +16 -3
  7. data/.ruby-version +1 -0
  8. data/.travis.yml +28 -0
  9. data/Dockerfile +36 -0
  10. data/Gemfile +7 -2
  11. data/Gemfile.lock +188 -30
  12. data/README.md +40 -6
  13. data/Rakefile +4 -20
  14. data/codecov.yml +71 -0
  15. data/common_gemfile.rb +6 -18
  16. data/decidim-admin/Gemfile +17 -0
  17. data/decidim-admin/Gemfile.lock +383 -0
  18. data/decidim-admin/README.md +28 -0
  19. data/decidim-admin/Rakefile +32 -0
  20. data/decidim-admin/app/assets/config/decidim_admin_manifest.js +2 -0
  21. data/{template.rb → decidim-admin/app/assets/images/decidim/admin/.keep} +0 -0
  22. data/decidim-admin/app/assets/javascripts/decidim/admin.js +21 -0
  23. data/decidim-admin/app/assets/stylesheets/decidim/admin.scss +8 -0
  24. data/decidim-admin/app/assets/stylesheets/decidim/admin/_actions.scss +8 -0
  25. data/decidim-admin/app/assets/stylesheets/decidim/admin/_foundation_and_overrides.scss +52 -0
  26. data/decidim-admin/app/assets/stylesheets/decidim/admin/_layout.scss +16 -0
  27. data/decidim-admin/app/assets/stylesheets/decidim/admin/_login.scss +36 -0
  28. data/decidim-admin/app/assets/stylesheets/decidim/admin/_settings.scss +566 -0
  29. data/decidim-admin/app/assets/stylesheets/decidim/admin/_sidebar.scss +73 -0
  30. data/decidim-admin/app/assets/stylesheets/decidim/admin/_tables.scss +5 -0
  31. data/decidim-admin/app/constraints/decidim/admin/organization_dashboard_constraint.rb +36 -0
  32. data/decidim-admin/app/controllers/decidim/admin/application_controller.rb +10 -0
  33. data/decidim-admin/app/controllers/decidim/admin/dashboard_controller.rb +9 -0
  34. data/decidim-admin/app/helpers/decidim/admin/application_helper.rb +12 -0
  35. data/decidim-admin/app/jobs/decidim/admin/application_job.rb +9 -0
  36. data/decidim-admin/app/mailers/decidim/admin/application_mailer.rb +11 -0
  37. data/decidim-admin/app/models/decidim/admin/application_record.rb +10 -0
  38. data/decidim-admin/app/policies/decidim/admin/application_policy.rb +20 -0
  39. data/decidim-admin/app/policies/decidim/admin/organization_policy.rb +15 -0
  40. data/decidim-admin/app/views/decidim/admin/dashboard/show.html.erb +3 -0
  41. data/decidim-admin/app/views/decidim/admin/devise/mailers/password_change.html.erb +3 -0
  42. data/decidim-admin/app/views/decidim/admin/devise/mailers/reset_password_instructions.html.erb +8 -0
  43. data/decidim-admin/app/views/layouts/decidim/admin/_header.html.erb +4 -0
  44. data/decidim-admin/app/views/layouts/decidim/admin/_login_items.html.erb +8 -0
  45. data/decidim-admin/app/views/layouts/decidim/admin/_sidebar.html.erb +13 -0
  46. data/decidim-admin/app/views/layouts/decidim/admin/application.html.erb +40 -0
  47. data/decidim-admin/app/views/layouts/decidim/admin/login.html.erb +19 -0
  48. data/decidim-admin/bin/rails +14 -0
  49. data/decidim-admin/config/i18n-tasks.yml +120 -0
  50. data/decidim-admin/config/locales/en.yml +8 -0
  51. data/decidim-admin/config/routes.rb +4 -0
  52. data/decidim-admin/decidim-admin.gemspec +38 -0
  53. data/decidim-admin/lib/decidim/admin.rb +12 -0
  54. data/decidim-admin/lib/decidim/admin/engine.rb +31 -0
  55. data/decidim-admin/lib/tasks/decidim/admin_tasks.rake +5 -0
  56. data/decidim-admin/spec/factories.rb +1 -0
  57. data/decidim-admin/spec/features/admin_access_control.rb +52 -0
  58. data/decidim-admin/spec/features/admin_invite_spec.rb +38 -0
  59. data/decidim-admin/spec/policies/organization_policy_spec.rb +41 -0
  60. data/decidim-admin/spec/spec_helper.rb +3 -0
  61. data/decidim-dev/Gemfile +17 -0
  62. data/decidim-dev/Gemfile.lock +381 -0
  63. data/decidim-dev/README.md +28 -0
  64. data/decidim-dev/decidim-dev.gemspec +30 -0
  65. data/decidim-dev/lib/decidim/common_rake.rb +14 -0
  66. data/decidim-dev/lib/decidim/test/base_spec_helper.rb +44 -0
  67. data/decidim-dev/lib/decidim/test/i18n_spec.rb +18 -0
  68. data/decidim-dev/lib/decidim/test/rspec_support/action_mailer.rb +46 -0
  69. data/decidim-dev/lib/decidim/test/rspec_support/active_job.rb +11 -0
  70. data/decidim-dev/lib/decidim/test/rspec_support/capybara.rb +19 -0
  71. data/decidim-dev/lib/decidim/test/rspec_support/database_cleaner.rb +13 -0
  72. data/decidim-dev/lib/decidim/test/rspec_support/factory_girl.rb +4 -0
  73. data/decidim-dev/lib/decidim/test/rspec_support/i18n.rb +12 -0
  74. data/decidim-dev/lib/decidim/test/rspec_support/warden.rb +8 -0
  75. data/decidim-dev/lib/decidim/test/rspec_support/wisper.rb +6 -0
  76. data/decidim-dev/lib/generators/decidim/dummy_generator.rb +65 -0
  77. data/decidim-system/Gemfile +17 -0
  78. data/decidim-system/Gemfile.lock +377 -0
  79. data/decidim-system/README.md +28 -0
  80. data/decidim-system/Rakefile +32 -0
  81. data/decidim-system/app/assets/config/decidim_system_manifest.js +2 -0
  82. data/decidim-system/app/assets/images/decidim/system/.keep +0 -0
  83. data/decidim-system/app/assets/javascripts/decidim/system.js +21 -0
  84. data/decidim-system/app/assets/stylesheets/decidim/system.scss +8 -0
  85. data/decidim-system/app/assets/stylesheets/decidim/system/_actions.scss +8 -0
  86. data/decidim-system/app/assets/stylesheets/decidim/system/_foundation_and_overrides.scss +52 -0
  87. data/decidim-system/app/assets/stylesheets/decidim/system/_layout.scss +16 -0
  88. data/decidim-system/app/assets/stylesheets/decidim/system/_login.scss +36 -0
  89. data/decidim-system/app/assets/stylesheets/decidim/system/_settings.scss +566 -0
  90. data/decidim-system/app/assets/stylesheets/decidim/system/_sidebar.scss +73 -0
  91. data/decidim-system/app/assets/stylesheets/decidim/system/_tables.scss +5 -0
  92. data/decidim-system/app/commands/decidim/system/create_admin.rb +40 -0
  93. data/decidim-system/app/commands/decidim/system/register_organization.rb +59 -0
  94. data/decidim-system/app/commands/decidim/system/update_admin.rb +52 -0
  95. data/decidim-system/app/commands/decidim/system/update_organization.rb +51 -0
  96. data/decidim-system/app/controllers/decidim/system/admins_controller.rb +67 -0
  97. data/decidim-system/app/controllers/decidim/system/application_controller.rb +11 -0
  98. data/decidim-system/app/controllers/decidim/system/dashboard_controller.rb +9 -0
  99. data/decidim-system/app/controllers/decidim/system/devise/passwords_controller.rb +12 -0
  100. data/decidim-system/app/controllers/decidim/system/devise/sessions_controller.rb +12 -0
  101. data/decidim-system/app/controllers/decidim/system/organizations_controller.rb +59 -0
  102. data/decidim-system/app/forms/decidim/system/admin_form.rb +33 -0
  103. data/decidim-system/app/forms/decidim/system/register_organization_form.rb +20 -0
  104. data/decidim-system/app/forms/decidim/system/update_organization_form.rb +28 -0
  105. data/decidim-system/app/helpers/decidim/system/application_helper.rb +12 -0
  106. data/decidim-system/app/jobs/decidim/system/application_job.rb +9 -0
  107. data/decidim-system/app/mailers/decidim/system/application_mailer.rb +11 -0
  108. data/decidim-system/app/models/decidim/system/admin.rb +18 -0
  109. data/decidim-system/app/models/decidim/system/application_record.rb +10 -0
  110. data/decidim-system/app/views/decidim/system/admins/_form.html.erb +11 -0
  111. data/decidim-system/app/views/decidim/system/admins/edit.html.erb +11 -0
  112. data/decidim-system/app/views/decidim/system/admins/index.html.erb +33 -0
  113. data/decidim-system/app/views/decidim/system/admins/new.html.erb +11 -0
  114. data/decidim-system/app/views/decidim/system/admins/show.html.erb +9 -0
  115. data/decidim-system/app/views/decidim/system/dashboard/show.html.erb +3 -0
  116. data/decidim-system/app/views/decidim/system/devise/mailers/password_change.html.erb +3 -0
  117. data/decidim-system/app/views/decidim/system/devise/mailers/reset_password_instructions.html.erb +8 -0
  118. data/decidim-system/app/views/decidim/system/devise/passwords/edit.html.erb +23 -0
  119. data/decidim-system/app/views/decidim/system/devise/passwords/new.html.erb +15 -0
  120. data/decidim-system/app/views/decidim/system/devise/sessions/new.html.erb +23 -0
  121. data/decidim-system/app/views/decidim/system/devise/shared/_links.html.erb +25 -0
  122. data/decidim-system/app/views/decidim/system/organizations/edit.html.erb +17 -0
  123. data/decidim-system/app/views/decidim/system/organizations/index.html.erb +34 -0
  124. data/decidim-system/app/views/decidim/system/organizations/new.html.erb +25 -0
  125. data/decidim-system/app/views/decidim/system/organizations/show.html.erb +11 -0
  126. data/decidim-system/app/views/layouts/decidim/system/_header.html.erb +4 -0
  127. data/decidim-system/app/views/layouts/decidim/system/_login_items.html.erb +8 -0
  128. data/decidim-system/app/views/layouts/decidim/system/_sidebar.html.erb +15 -0
  129. data/decidim-system/app/views/layouts/decidim/system/application.html.erb +40 -0
  130. data/decidim-system/app/views/layouts/decidim/system/login.html.erb +19 -0
  131. data/decidim-system/bin/rails +14 -0
  132. data/decidim-system/config/i18n-tasks.yml +120 -0
  133. data/decidim-system/config/locales/en.yml +60 -0
  134. data/decidim-system/config/routes.rb +17 -0
  135. data/decidim-system/db/migrate/20160919105637_devise_create_decidim_admins.rb +26 -0
  136. data/decidim-system/db/seeds.rb +9 -0
  137. data/decidim-system/decidim-system.gemspec +36 -0
  138. data/decidim-system/lib/decidim/system.rb +12 -0
  139. data/decidim-system/lib/decidim/system/engine.rb +31 -0
  140. data/decidim-system/lib/tasks/decidim/system_tasks.rake +5 -0
  141. data/decidim-system/spec/commands/decidim/system/create_admin_spec.rb +48 -0
  142. data/decidim-system/spec/commands/decidim/system/register_organization_spec.rb +68 -0
  143. data/decidim-system/spec/factories.rb +9 -0
  144. data/decidim-system/spec/features/manage_admins_spec.rb +67 -0
  145. data/decidim-system/spec/features/organizations_spec.rb +62 -0
  146. data/decidim-system/spec/features/sessions_spec.rb +38 -0
  147. data/decidim-system/spec/models/admin_spec.rb +23 -0
  148. data/decidim-system/spec/spec_helper.rb +2 -0
  149. data/decidim.gemspec +3 -1
  150. data/docker-compose.yml +24 -0
  151. data/lib/decidim.rb +8 -0
  152. data/lib/generators/decidim/app_builder.rb +1 -1
  153. data/lib/generators/decidim/app_generator.rb +35 -4
  154. data/lib/generators/decidim/install_generator.rb +121 -0
  155. data/lib/generators/decidim/templates/Dockerfile.erb +26 -0
  156. data/lib/generators/decidim/templates/Gemfile.erb +8 -1
  157. data/lib/generators/decidim/templates/README.md.erb +26 -0
  158. data/lib/generators/decidim/templates/app.json.erb +13 -0
  159. data/lib/generators/decidim/templates/cable.yml.erb +9 -0
  160. data/lib/generators/decidim/templates/database.yml.erb +85 -0
  161. data/lib/generators/decidim/templates/docker-compose.yml.erb +28 -0
  162. data/lib/generators/decidim/templates/initializer.rb +4 -0
  163. data/lib/generators/decidim/templates/secrets.yml.erb +30 -0
  164. data/run_ci.sh +7 -0
  165. metadata +183 -8
  166. data/circle.yml +0 -19
@@ -0,0 +1,28 @@
1
+ # Decidim::System
2
+ Short description and motivation.
3
+
4
+ ## Usage
5
+ How to use my plugin.
6
+
7
+ ## Installation
8
+ Add this line to your application's Gemfile:
9
+
10
+ ```ruby
11
+ gem 'decidim-system'
12
+ ```
13
+
14
+ And then execute:
15
+ ```bash
16
+ $ bundle
17
+ ```
18
+
19
+ Or install it yourself as:
20
+ ```bash
21
+ $ gem install decidim-system
22
+ ```
23
+
24
+ ## Contributing
25
+ Contribution directions go here.
26
+
27
+ ## License
28
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+ $LOAD_PATH.push File.expand_path("../lib", __FILE__)
3
+
4
+ # Maintain your gem's version:
5
+ require_relative "../decidim-core/lib/decidim/core/version"
6
+
7
+ # Describe your gem and declare its dependencies:
8
+ Gem::Specification.new do |s|
9
+ s.name = "decidim-dev"
10
+ s.version = Decidim.version
11
+ s.authors = ["Josep Jaume Rey Peroy", "Marc Riera Casals", "Oriol Gual Oliva"]
12
+ s.email = ["josepjaume@gmail.com", "mrc2407@gmail.com", "oriolgual@gmail.com"]
13
+ s.homepage = ""
14
+ s.summary = "Decidim Dev tools"
15
+ s.description = "Utilities and tools we need to develop Decidim"
16
+ s.license = "MIT"
17
+
18
+ s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md"]
19
+
20
+ s.add_dependency "factory_girl_rails"
21
+ s.add_dependency "database_cleaner", "~> 1.5.0"
22
+ s.add_dependency "capybara", "~> 2.4"
23
+ s.add_dependency "rspec-rails", "~> 3.5"
24
+ s.add_dependency "byebug"
25
+ s.add_dependency "wisper-rspec"
26
+ s.add_dependency "pg"
27
+ s.add_dependency "listen"
28
+ s.add_dependency "launchy"
29
+ s.add_dependency "i18n-tasks", "~> 0.9.5"
30
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+ require_relative "../generators/decidim/dummy_generator"
3
+
4
+ desc "Generates a dummy app for testing"
5
+ namespace :common do
6
+ task :test_app do |_t, _args|
7
+ Decidim::Generators::DummyGenerator.start [
8
+ "--engine_path=#{ENV["ENGINE_PATH"]}",
9
+ "--migrate=true",
10
+ "--quiet"
11
+ ]
12
+ FileUtils.cd(ENV["ENGINE_PATH"])
13
+ end
14
+ end
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+ ENV["RAILS_ENV"] ||= "test"
3
+
4
+ if ENV["CI"]
5
+ require "simplecov"
6
+ SimpleCov.start
7
+
8
+ require "codecov"
9
+ SimpleCov.formatter = SimpleCov::Formatter::Codecov
10
+ end
11
+
12
+ begin
13
+ dummy_app_path = "#{ENV["ENGINE_NAME"]}_dummy_app/config/environment"
14
+ require dummy_app_path
15
+ rescue LoadError
16
+ puts "Could not load dummy application. Please ensure you have run `bundle exec rake test_app`"
17
+ puts "Tried to load it from #{dummy_app_path}"
18
+ exit
19
+ end
20
+
21
+ require "rspec/rails"
22
+ require "factory_girl_rails"
23
+ require "database_cleaner"
24
+ require "byebug"
25
+
26
+ # Requires supporting files with custom matchers and macros, etc,
27
+ # in ./support/ and its subdirectories.
28
+ Dir["#{File.dirname(__FILE__)}/rspec_support/**/*.rb"].each { |f| require f }
29
+ Dir["support/**/*.rb"].each { |f| require f }
30
+
31
+ RSpec.configure do |config|
32
+ config.color = true
33
+ config.fail_fast = ENV["FAIL_FAST"] || false
34
+ config.infer_spec_type_from_file_location!
35
+ config.mock_with :rspec
36
+ config.raise_errors_for_deprecations!
37
+
38
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
39
+ # examples within a transaction, comment the following line or assign false
40
+ # instead of true.
41
+ config.use_transactional_fixtures = false
42
+ end
43
+
44
+ require_relative "i18n_spec"
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+ require "i18n/tasks"
3
+
4
+ RSpec.describe "I18n" do
5
+ let(:i18n) { I18n::Tasks::BaseTask.new }
6
+ let(:missing_keys) { i18n.missing_keys }
7
+ let(:unused_keys) { i18n.unused_keys }
8
+
9
+ it "does not have missing keys" do
10
+ expect(missing_keys).to be_empty,
11
+ "Missing #{missing_keys.leaves.count} i18n keys, run `i18n-tasks missing` to show them"
12
+ end
13
+
14
+ it "does not have unused keys" do
15
+ expect(unused_keys).to be_empty,
16
+ "#{unused_keys.leaves.count} unused i18n keys, run `i18n-tasks unused` to show them"
17
+ end
18
+ end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.configure do |config|
4
+ config.before(:each) do
5
+ ActionMailer::Base.deliveries.clear
6
+ end
7
+ end
8
+
9
+ # A set of helpers meant to make your life easier when testing
10
+ # emails, especially given the fact that ActionMailer's API can
11
+ # be a bit inconsistent.
12
+ module MailerHelpers
13
+ def emails
14
+ ActionMailer::Base.deliveries
15
+ end
16
+
17
+ def last_email
18
+ emails.last
19
+ end
20
+
21
+ def last_email_body
22
+ last_email.body.encoded
23
+ end
24
+
25
+ def last_email_link
26
+ URI.extract(last_email_body.to_s, %w(http https)).last
27
+ end
28
+ end
29
+
30
+ RSpec.configure do |config|
31
+ config.include MailerHelpers
32
+ end
33
+
34
+ RSpec.configure do |config|
35
+ config.before :example, perform_enqueued: true do
36
+ @old_perform_enqueued_jobs = ActiveJob::Base.queue_adapter.perform_enqueued_jobs
37
+ @old_perform_enqueued_at_jobs = ActiveJob::Base.queue_adapter.perform_enqueued_at_jobs
38
+ ActiveJob::Base.queue_adapter.perform_enqueued_jobs = true
39
+ ActiveJob::Base.queue_adapter.perform_enqueued_at_jobs = true
40
+ end
41
+
42
+ config.after :example, perform_enqueued: true do
43
+ ActiveJob::Base.queue_adapter.perform_enqueued_jobs = @old_perform_enqueued_jobs
44
+ ActiveJob::Base.queue_adapter.perform_enqueued_at_jobs = @old_perform_enqueued_at_jobs
45
+ end
46
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.configure do |config|
4
+ config.include ActiveJob::TestHelper
5
+
6
+ config.before(:each) do
7
+ clear_enqueued_jobs
8
+ end
9
+ end
10
+
11
+ ActiveJob::Base.queue_adapter = :test
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+ def switch_to_host(host = "lvh.me")
3
+ app_host = (host ? "http://#{host}" : nil)
4
+ Capybara.app_host = app_host
5
+ end
6
+
7
+ def switch_to_default_host
8
+ switch_to_host nil
9
+ end
10
+
11
+ Capybara.configure do |config|
12
+ config.always_include_port = true
13
+ end
14
+
15
+ RSpec.configure do |config|
16
+ config.before :each, type: :feature do
17
+ switch_to_default_host
18
+ end
19
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+ RSpec.configure do |config|
3
+ config.before(:suite) do
4
+ DatabaseCleaner.strategy = :transaction
5
+ DatabaseCleaner.clean_with(:truncation)
6
+ end
7
+
8
+ config.around(:each) do |example|
9
+ DatabaseCleaner.cleaning do
10
+ example.run
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+ RSpec.configure do |config|
3
+ config.include FactoryGirl::Syntax::Methods
4
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+ RSpec.configure do |config|
3
+ config.before(:suite) do
4
+ I18n.config.enforce_available_locales = false
5
+ end
6
+
7
+ config.around(:each) do |example|
8
+ previous_locale = I18n.locale
9
+ example.run
10
+ I18n.locale = previous_locale
11
+ end
12
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+ RSpec.configure do |config|
3
+ config.include Warden::Test::Helpers, type: :feature
4
+
5
+ config.after :each, type: :feature do
6
+ Warden.test_reset!
7
+ end
8
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+ require "wisper/rspec/matchers"
3
+
4
+ RSpec.configure do |config|
5
+ config.include(Wisper::RSpec::BroadcastMatcher)
6
+ end
@@ -0,0 +1,65 @@
1
+ # frozen_string_literal: true
2
+ require "rails/generators"
3
+ require "generators/decidim/app_generator"
4
+
5
+ module Decidim
6
+ module Generators
7
+ # Generates a dummy test Rails app for the given library folder. It uses
8
+ # the `AppGenerator` class to actually generate the Rails app, so this
9
+ # generator only sets the path and some flags.
10
+ #
11
+ # The Rails app will be installed with some flags to disable git, tests,
12
+ # Gemfile and other options. Refer to the `create_dummy_app` method to see
13
+ # all the flags passed to the `AppGenerator` class, which is the one that
14
+ # actually generates the Rails app.
15
+ #
16
+ # Remember that, for how generators work, actions are executed based on the
17
+ # definition order of the public methods.
18
+ class DummyGenerator < Rails::Generators::Base
19
+ desc "Generate dummy app for testing purposes"
20
+
21
+ class_option :engine_path, type: :string,
22
+ desc: "The library where the dummy app will be installed"
23
+
24
+ def cleanup
25
+ remove_directory_if_exists(dummy_path)
26
+ end
27
+
28
+ def create_dummy_app
29
+ Decidim::Generators::AppGenerator.start [
30
+ dummy_path,
31
+ "--skip_gemfile",
32
+ "--skip-bundle",
33
+ "--skip-git",
34
+ "--skip-keeps",
35
+ "--skip-test",
36
+ "--recreate_db"
37
+ ]
38
+ end
39
+
40
+ def set_locales
41
+ inject_into_file "#{dummy_path}/config/application.rb", after: "class Application < Rails::Application" do
42
+ "\n config.i18n.available_locales = %w(en ca es)\n config.i18n.default_locale = :en"
43
+ end
44
+ end
45
+
46
+ private
47
+
48
+ def dummy_path
49
+ ENV["DUMMY_PATH"] || engine_path + "/spec/#{dir_name}_dummy_app"
50
+ end
51
+
52
+ def remove_directory_if_exists(path)
53
+ remove_dir(path) if File.directory?(path)
54
+ end
55
+
56
+ def dir_name
57
+ engine_path.split("/").last
58
+ end
59
+
60
+ def engine_path
61
+ options[:engine_path]
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,17 @@
1
+ eval(File.read(File.dirname(__FILE__) + "/../common_gemfile.rb"))
2
+
3
+ # Declare your gem's dependencies in decidim-system.gemspec.
4
+ # Bundler will treat runtime dependencies like base dependencies, and
5
+ # development dependencies will be added by default to the :development group.
6
+ gemspec
7
+
8
+ # Declare any dependencies that are still in development here instead of in
9
+ # your gemspec. These might include edge Rails or gems from your path or
10
+ # Git. Remember to move these dependencies to your gemspec before releasing
11
+ # your gem to rubygems.org.
12
+
13
+ # To use a debugger
14
+ # gem 'byebug', group: [:development, :test]
15
+
16
+ gemspec path: "../decidim-core"
17
+ gemspec path: ".."
@@ -0,0 +1,377 @@
1
+ GIT
2
+ remote: https://github.com/sgruhier/foundation_rails_helper
3
+ revision: d8819b3a5f9d82251aac7559e0d07505c9777717
4
+ specs:
5
+ foundation_rails_helper (2.0.0)
6
+ actionpack (>= 4.1)
7
+ activemodel (>= 4.1)
8
+ activesupport (>= 4.1)
9
+ railties (>= 4.1)
10
+ tzinfo (~> 1.2, >= 1.2.2)
11
+
12
+ PATH
13
+ remote: ../decidim-core
14
+ specs:
15
+ decidim-core (0.0.1.alpha2)
16
+ active_link_to (~> 1.0.0)
17
+ devise (~> 4.2)
18
+ devise-i18n (~> 1.1.0)
19
+ foundation-rails (~> 6.2.3.0)
20
+ foundation_rails_helper (~> 2.0.0)
21
+ jbuilder (~> 2.5)
22
+ jquery-rails (~> 4.0)
23
+ jquery-turbolinks (~> 2.1.0)
24
+ rails (~> 5.0.0)
25
+ rectify (~> 0.6)
26
+ sass-rails (~> 5.0.0)
27
+ turbolinks (~> 5.0.0)
28
+
29
+ PATH
30
+ remote: ..
31
+ specs:
32
+ decidim (0.0.1.alpha2)
33
+ decidim-admin (= 0.0.1.alpha2)
34
+ decidim-core (= 0.0.1.alpha2)
35
+ decidim-system (= 0.0.1.alpha2)
36
+ rails (~> 5.0.0)
37
+ decidim-admin (0.0.1.alpha2)
38
+ active_link_to (~> 1.0.0)
39
+ decidim-core
40
+ devise (~> 4.2)
41
+ devise-i18n (~> 1.1.0)
42
+ devise_invitable (~> 1.7.0)
43
+ foundation-rails (~> 6.2.3.0)
44
+ foundation_rails_helper (~> 2.0.0)
45
+ jbuilder (~> 2.5)
46
+ jquery-rails (~> 4.0)
47
+ jquery-turbolinks (~> 2.1.0)
48
+ pundit (~> 1.1.0)
49
+ rails (~> 5.0.0)
50
+ rectify (~> 0.6)
51
+ sass-rails (~> 5.0.0)
52
+ turbolinks (~> 5.0.0)
53
+ decidim-dev (0.0.1.alpha2)
54
+ byebug
55
+ capybara (~> 2.4)
56
+ database_cleaner (~> 1.5.0)
57
+ factory_girl_rails
58
+ i18n-tasks (~> 0.9.5)
59
+ launchy
60
+ listen
61
+ pg
62
+ rspec-rails (~> 3.5)
63
+ wisper-rspec
64
+
65
+ PATH
66
+ remote: .
67
+ specs:
68
+ decidim-system (0.0.1.alpha2)
69
+ active_link_to (~> 1.0.0)
70
+ decidim-core
71
+ devise (~> 4.2)
72
+ devise-i18n (~> 1.1.0)
73
+ devise_invitable (~> 1.7.0)
74
+ foundation-rails (~> 6.2.3.0)
75
+ foundation_rails_helper (~> 2.0.0)
76
+ jbuilder (~> 2.5)
77
+ jquery-rails (~> 4.0)
78
+ jquery-turbolinks (~> 2.1.0)
79
+ rails (~> 5.0.0)
80
+ rectify (~> 0.6)
81
+ sass-rails (~> 5.0.0)
82
+ turbolinks (~> 5.0.0)
83
+
84
+ GEM
85
+ remote: https://rubygems.org/
86
+ specs:
87
+ actioncable (5.0.0.1)
88
+ actionpack (= 5.0.0.1)
89
+ nio4r (~> 1.2)
90
+ websocket-driver (~> 0.6.1)
91
+ actionmailer (5.0.0.1)
92
+ actionpack (= 5.0.0.1)
93
+ actionview (= 5.0.0.1)
94
+ activejob (= 5.0.0.1)
95
+ mail (~> 2.5, >= 2.5.4)
96
+ rails-dom-testing (~> 2.0)
97
+ actionpack (5.0.0.1)
98
+ actionview (= 5.0.0.1)
99
+ activesupport (= 5.0.0.1)
100
+ rack (~> 2.0)
101
+ rack-test (~> 0.6.3)
102
+ rails-dom-testing (~> 2.0)
103
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
104
+ actionview (5.0.0.1)
105
+ activesupport (= 5.0.0.1)
106
+ builder (~> 3.1)
107
+ erubis (~> 2.7.0)
108
+ rails-dom-testing (~> 2.0)
109
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
110
+ active_link_to (1.0.3)
111
+ actionpack
112
+ activejob (5.0.0.1)
113
+ activesupport (= 5.0.0.1)
114
+ globalid (>= 0.3.6)
115
+ activemodel (5.0.0.1)
116
+ activesupport (= 5.0.0.1)
117
+ activerecord (5.0.0.1)
118
+ activemodel (= 5.0.0.1)
119
+ activesupport (= 5.0.0.1)
120
+ arel (~> 7.0)
121
+ activesupport (5.0.0.1)
122
+ concurrent-ruby (~> 1.0, >= 1.0.2)
123
+ i18n (~> 0.7)
124
+ minitest (~> 5.1)
125
+ tzinfo (~> 1.1)
126
+ addressable (2.4.0)
127
+ arel (7.1.2)
128
+ ast (2.3.0)
129
+ axiom-types (0.1.1)
130
+ descendants_tracker (~> 0.0.4)
131
+ ice_nine (~> 0.11.0)
132
+ thread_safe (~> 0.3, >= 0.3.1)
133
+ babel-source (5.8.35)
134
+ babel-transpiler (0.7.0)
135
+ babel-source (>= 4.0, < 6)
136
+ execjs (~> 2.0)
137
+ bcrypt (3.1.11)
138
+ builder (3.2.2)
139
+ byebug (9.0.5)
140
+ capybara (2.9.1)
141
+ addressable
142
+ mime-types (>= 1.16)
143
+ nokogiri (>= 1.3.3)
144
+ rack (>= 1.0.0)
145
+ rack-test (>= 0.5.4)
146
+ xpath (~> 2.0)
147
+ codecov (0.1.5)
148
+ json
149
+ simplecov
150
+ url
151
+ coercible (1.0.0)
152
+ descendants_tracker (~> 0.0.1)
153
+ concurrent-ruby (1.0.2)
154
+ database_cleaner (1.5.3)
155
+ descendants_tracker (0.0.4)
156
+ thread_safe (~> 0.3, >= 0.3.1)
157
+ devise (4.2.0)
158
+ bcrypt (~> 3.0)
159
+ orm_adapter (~> 0.1)
160
+ railties (>= 4.1.0, < 5.1)
161
+ responders
162
+ warden (~> 1.2.3)
163
+ devise-i18n (1.1.0)
164
+ devise_invitable (1.7.0)
165
+ actionmailer (>= 4.0.0)
166
+ devise (>= 4.0.0)
167
+ diff-lcs (1.2.5)
168
+ docile (1.1.5)
169
+ easy_translate (0.5.0)
170
+ json
171
+ thread
172
+ thread_safe
173
+ equalizer (0.0.11)
174
+ erubis (2.7.0)
175
+ execjs (2.7.0)
176
+ factory_girl (4.7.0)
177
+ activesupport (>= 3.0.0)
178
+ factory_girl_rails (4.7.0)
179
+ factory_girl (~> 4.7.0)
180
+ railties (>= 3.0.0)
181
+ ffi (1.9.14)
182
+ foundation-rails (6.2.3.0)
183
+ railties (>= 3.1.0)
184
+ sass (>= 3.3.0, < 3.5)
185
+ sprockets-es6 (>= 0.9.0)
186
+ globalid (0.3.7)
187
+ activesupport (>= 4.1.0)
188
+ highline (1.7.8)
189
+ i18n (0.7.0)
190
+ i18n-tasks (0.9.5)
191
+ activesupport (>= 4.0.2)
192
+ ast (>= 2.1.0)
193
+ easy_translate (>= 0.5.0)
194
+ erubis
195
+ highline (>= 1.7.3)
196
+ i18n
197
+ parser (>= 2.2.3.0)
198
+ term-ansicolor (>= 1.3.2)
199
+ terminal-table (>= 1.5.1)
200
+ ice_nine (0.11.2)
201
+ jbuilder (2.6.0)
202
+ activesupport (>= 3.0.0, < 5.1)
203
+ multi_json (~> 1.2)
204
+ jquery-rails (4.2.1)
205
+ rails-dom-testing (>= 1, < 3)
206
+ railties (>= 4.2.0)
207
+ thor (>= 0.14, < 2.0)
208
+ jquery-turbolinks (2.1.0)
209
+ railties (>= 3.1.0)
210
+ turbolinks
211
+ json (2.0.2)
212
+ launchy (2.4.3)
213
+ addressable (~> 2.3)
214
+ listen (3.0.8)
215
+ rb-fsevent (~> 0.9, >= 0.9.4)
216
+ rb-inotify (~> 0.9, >= 0.9.7)
217
+ loofah (2.0.3)
218
+ nokogiri (>= 1.5.9)
219
+ mail (2.6.4)
220
+ mime-types (>= 1.16, < 4)
221
+ method_source (0.8.2)
222
+ mime-types (3.1)
223
+ mime-types-data (~> 3.2015)
224
+ mime-types-data (3.2016.0521)
225
+ mini_portile2 (2.1.0)
226
+ minitest (5.9.0)
227
+ multi_json (1.12.1)
228
+ nio4r (1.2.1)
229
+ nokogiri (1.6.8)
230
+ mini_portile2 (~> 2.1.0)
231
+ pkg-config (~> 1.1.7)
232
+ orm_adapter (0.5.0)
233
+ parser (2.3.1.4)
234
+ ast (~> 2.2)
235
+ pg (0.18.4)
236
+ pkg-config (1.1.7)
237
+ pundit (1.1.0)
238
+ activesupport (>= 3.0.0)
239
+ rack (2.0.1)
240
+ rack-test (0.6.3)
241
+ rack (>= 1.0)
242
+ rails (5.0.0.1)
243
+ actioncable (= 5.0.0.1)
244
+ actionmailer (= 5.0.0.1)
245
+ actionpack (= 5.0.0.1)
246
+ actionview (= 5.0.0.1)
247
+ activejob (= 5.0.0.1)
248
+ activemodel (= 5.0.0.1)
249
+ activerecord (= 5.0.0.1)
250
+ activesupport (= 5.0.0.1)
251
+ bundler (>= 1.3.0, < 2.0)
252
+ railties (= 5.0.0.1)
253
+ sprockets-rails (>= 2.0.0)
254
+ rails-dom-testing (2.0.1)
255
+ activesupport (>= 4.2.0, < 6.0)
256
+ nokogiri (~> 1.6.0)
257
+ rails-html-sanitizer (1.0.3)
258
+ loofah (~> 2.0)
259
+ railties (5.0.0.1)
260
+ actionpack (= 5.0.0.1)
261
+ activesupport (= 5.0.0.1)
262
+ method_source
263
+ rake (>= 0.8.7)
264
+ thor (>= 0.18.1, < 2.0)
265
+ rake (11.3.0)
266
+ rb-fsevent (0.9.7)
267
+ rb-inotify (0.9.7)
268
+ ffi (>= 0.5.0)
269
+ rectify (0.6.1)
270
+ activemodel (>= 4.1.0)
271
+ activerecord (>= 4.1.0)
272
+ activesupport (>= 4.1.0)
273
+ virtus (~> 1.0.5)
274
+ wisper (>= 1.6.1)
275
+ responders (2.3.0)
276
+ railties (>= 4.2.0, < 5.1)
277
+ rspec (3.5.0)
278
+ rspec-core (~> 3.5.0)
279
+ rspec-expectations (~> 3.5.0)
280
+ rspec-mocks (~> 3.5.0)
281
+ rspec-core (3.5.3)
282
+ rspec-support (~> 3.5.0)
283
+ rspec-expectations (3.5.0)
284
+ diff-lcs (>= 1.2.0, < 2.0)
285
+ rspec-support (~> 3.5.0)
286
+ rspec-mocks (3.5.0)
287
+ diff-lcs (>= 1.2.0, < 2.0)
288
+ rspec-support (~> 3.5.0)
289
+ rspec-rails (3.5.2)
290
+ actionpack (>= 3.0)
291
+ activesupport (>= 3.0)
292
+ railties (>= 3.0)
293
+ rspec-core (~> 3.5.0)
294
+ rspec-expectations (~> 3.5.0)
295
+ rspec-mocks (~> 3.5.0)
296
+ rspec-support (~> 3.5.0)
297
+ rspec-support (3.5.0)
298
+ rspec_junit_formatter (0.2.3)
299
+ builder (< 4)
300
+ rspec-core (>= 2, < 4, != 2.12.0)
301
+ sass (3.4.22)
302
+ sass-rails (5.0.6)
303
+ railties (>= 4.0.0, < 6)
304
+ sass (~> 3.1)
305
+ sprockets (>= 2.8, < 4.0)
306
+ sprockets-rails (>= 2.0, < 4.0)
307
+ tilt (>= 1.1, < 3)
308
+ simplecov (0.12.0)
309
+ docile (~> 1.1.0)
310
+ json (>= 1.8, < 3)
311
+ simplecov-html (~> 0.10.0)
312
+ simplecov-html (0.10.0)
313
+ sprockets (3.7.0)
314
+ concurrent-ruby (~> 1.0)
315
+ rack (> 1, < 3)
316
+ sprockets-es6 (0.9.2)
317
+ babel-source (>= 5.8.11)
318
+ babel-transpiler
319
+ sprockets (>= 3.0.0)
320
+ sprockets-rails (3.2.0)
321
+ actionpack (>= 4.0)
322
+ activesupport (>= 4.0)
323
+ sprockets (>= 3.0.0)
324
+ term-ansicolor (1.4.0)
325
+ tins (~> 1.0)
326
+ terminal-table (1.7.3)
327
+ unicode-display_width (~> 1.1.1)
328
+ thor (0.19.1)
329
+ thread (0.2.2)
330
+ thread_safe (0.3.5)
331
+ tilt (2.0.5)
332
+ tins (1.12.0)
333
+ turbolinks (5.0.1)
334
+ turbolinks-source (~> 5)
335
+ turbolinks-source (5.0.0)
336
+ tzinfo (1.2.2)
337
+ thread_safe (~> 0.1)
338
+ unicode-display_width (1.1.1)
339
+ url (0.3.2)
340
+ virtus (1.0.5)
341
+ axiom-types (~> 0.1)
342
+ coercible (~> 1.0)
343
+ descendants_tracker (~> 0.0, >= 0.0.3)
344
+ equalizer (~> 0.0, >= 0.0.9)
345
+ warden (1.2.6)
346
+ rack (>= 1.0)
347
+ websocket-driver (0.6.4)
348
+ websocket-extensions (>= 0.1.0)
349
+ websocket-extensions (0.1.2)
350
+ wisper (1.6.1)
351
+ wisper-rspec (0.0.2)
352
+ xpath (2.0.0)
353
+ nokogiri (~> 1.3)
354
+
355
+ PLATFORMS
356
+ ruby
357
+
358
+ DEPENDENCIES
359
+ bundler (~> 1.12)
360
+ codecov (~> 0.1.5)
361
+ decidim!
362
+ decidim-core!
363
+ decidim-dev
364
+ decidim-system!
365
+ foundation_rails_helper!
366
+ listen
367
+ pg
368
+ rake (~> 11.0)
369
+ rspec (~> 3.0)
370
+ rspec_junit_formatter (= 0.2.3)
371
+ simplecov (~> 0.12)
372
+
373
+ RUBY VERSION
374
+ ruby 2.3.1p112
375
+
376
+ BUNDLED WITH
377
+ 1.13.1