Skip to content

Commit

Permalink
System admin (#9)
Browse files Browse the repository at this point in the history
Add system panel
  • Loading branch information
oriolgual authored and josepjaume committed Sep 23, 2016
1 parent 0c61969 commit b128007
Show file tree
Hide file tree
Showing 126 changed files with 3,552 additions and 237 deletions.
4 changes: 4 additions & 0 deletions .hound.yml
@@ -1,4 +1,8 @@
ruby:
config_file: .rubocop.yml
scss:
enabled: false
jshint:
enabled: false

fail_on_violations: true
16 changes: 13 additions & 3 deletions .rubocop.yml
Expand Up @@ -23,9 +23,9 @@ AllCops:
- '**/Gemfile'
- 'vendor/**/*'
- 'spec/*'
- 'decidim-core/spec/**/*'
- 'decidim-core/test/**/*'
- 'decidim-core/db/**/*'
- 'decidim-*/spec/**/*'
- 'decidim-*/test/**/*'
- 'decidim-*/db/**/*'
# Default formatter will be used if no -f/--format option is given.
DefaultFormatter: progress
# Cop names are not displayed in offense messages by default. Change behavior
Expand Down Expand Up @@ -93,6 +93,10 @@ Style/Alias:
- prefer_alias
- prefer_alias_method

Style/AccessorMethodName:
Exclude:
- "lib/generators/decidim/app_generator.rb"

# Align the elements of a hash literal if they span more than one line.
Style/AlignHash:
# Alignment of entries using hash rocket as separator. Valid values are:
Expand Down Expand Up @@ -293,6 +297,7 @@ Style/CaseIndentation:
IndentationWidth: ~

Style/ClassAndModuleChildren:
Enabled: false
# Checks the style of children definitions at classes and modules.
#
# Basically there are two different styles:
Expand Down Expand Up @@ -814,6 +819,10 @@ Style/PredicateName:
Exclude:
- 'spec/**/*'

Style/Documentation:
Exclude:
- '**/*/spec/**/*_spec.rb'

Style/RaiseArgs:
EnforcedStyle: exploded
SupportedStyles:
Expand Down Expand Up @@ -1081,6 +1090,7 @@ Metrics/AbcSize:
# The ABC size is a calculated magnitude, so this number can be an Integer or
# a Float.
Max: 15
Enabled: false

Metrics/BlockNesting:
Max: 3
Expand Down
5 changes: 5 additions & 0 deletions Gemfile
Expand Up @@ -5,3 +5,8 @@ eval(File.read(File.dirname(__FILE__) + "/common_gemfile.rb"))
gemspec
gem "rspec_junit_formatter", "0.2.3", group: :test, require: false
gem "codecov", require: false, group: :test

gemspec path: "."
gemspec path: "decidim-core"

gem "rubocop"
139 changes: 120 additions & 19 deletions Gemfile.lock
@@ -1,13 +1,51 @@
GIT
remote: git://github.com/sgruhier/foundation_rails_helper.git
revision: 809f127b76747b53fb199ff4e5d3f06aa3d35f97
specs:
foundation_rails_helper (2.0.0)
actionpack (>= 4.1)
activemodel (>= 4.1)
activesupport (>= 4.1)
railties (>= 4.1)
tzinfo (~> 1.2, >= 1.2.2)

PATH
remote: .
specs:
decidim (0.0.1.alpha2)
decidim-core (= 0.0.1.alpha2)
decidim-system (= 0.0.1.alpha2)
rails (~> 5.0.0)
decidim-system (0.0.1.alpha2)
active_link_to (~> 1.0.0)
decidim-core
devise (~> 4.2)
devise_invitable (~> 1.7.0)
foundation-rails (~> 6.2.3.0)
foundation_rails_helper (~> 2.0.0)
jbuilder (~> 2.5)
jquery-rails (~> 4.0)
jquery-turbolinks (~> 2.1.0)
rails (~> 5.0.0)
rectify (~> 0.6)
sass-rails (~> 5.0.0)
turbolinks (~> 5.0.0)

PATH
remote: decidim-core
specs:
decidim-core (0.0.1.alpha2)
devise
foundation-rails (~> 6.2.3)
active_link_to (~> 1.0.0)
devise (~> 4.2)
foundation-rails (~> 6.2.3.0)
foundation_rails_helper (~> 2.0.0)
jbuilder (~> 2.5)
jquery-rails (~> 4.0)
jquery-turbolinks (~> 2.1.0)
rails (~> 5.0.0)
rectify (~> 0.6)
sass-rails (~> 5.0.0)
turbolinks (~> 5.0.0)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -35,6 +73,8 @@ GEM
erubis (~> 2.7.0)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
active_link_to (1.0.3)
actionpack
activejob (5.0.0.1)
activesupport (= 5.0.0.1)
globalid (>= 0.3.6)
Expand All @@ -51,6 +91,11 @@ GEM
tzinfo (~> 1.1)
addressable (2.4.0)
arel (7.1.2)
ast (2.3.0)
axiom-types (0.1.1)
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
babel-source (5.8.35)
babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6)
Expand All @@ -69,39 +114,65 @@ GEM
json
simplecov
url
coffee-rails (4.2.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.2.x)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.10.0)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
concurrent-ruby (1.0.2)
database_cleaner (1.5.3)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
devise (4.2.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0, < 5.1)
responders
warden (~> 1.2.3)
devise_invitable (1.7.0)
actionmailer (>= 4.0.0)
devise (>= 4.0.0)
diff-lcs (1.2.5)
docile (1.1.5)
easy_translate (0.5.0)
json
thread
thread_safe
equalizer (0.0.11)
erubis (2.7.0)
execjs (2.7.0)
factory_girl (4.7.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.7.0)
factory_girl (~> 4.7.0)
railties (>= 3.0.0)
ffi (1.9.14)
foundation-rails (6.2.3.0)
railties (>= 3.1.0)
sass (>= 3.3.0, < 3.5)
sprockets-es6 (>= 0.9.0)
globalid (0.3.7)
activesupport (>= 4.1.0)
highline (1.7.8)
i18n (0.7.0)
i18n-tasks (0.9.5)
activesupport (>= 4.0.2)
ast (>= 2.1.0)
easy_translate (>= 0.5.0)
erubis
highline (>= 1.7.3)
i18n
parser (>= 2.2.3.0)
term-ansicolor (>= 1.3.2)
terminal-table (>= 1.5.1)
ice_nine (0.11.2)
jbuilder (2.6.0)
activesupport (>= 3.0.0, < 5.1)
multi_json (~> 1.2)
jquery-rails (4.2.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jquery-turbolinks (2.1.0)
railties (>= 3.1.0)
turbolinks
json (2.0.2)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
Expand All @@ -122,8 +193,11 @@ GEM
mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7)
orm_adapter (0.5.0)
parser (2.3.1.4)
ast (~> 2.2)
pg (0.18.4)
pkg-config (1.1.7)
powerpack (0.1.1)
rack (2.0.1)
rack-test (0.6.3)
rack (>= 1.0)
Expand All @@ -150,10 +224,17 @@ GEM
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.5.0)
rainbow (2.1.0)
rake (11.3.0)
rb-fsevent (0.9.7)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
rectify (0.6.1)
activemodel (>= 4.1.0)
activerecord (>= 4.1.0)
activesupport (>= 4.1.0)
virtus (~> 1.0.5)
wisper (>= 1.6.1)
responders (2.3.0)
railties (>= 4.2.0, < 5.1)
rspec (3.5.0)
Expand All @@ -180,6 +261,13 @@ GEM
rspec_junit_formatter (0.2.3)
builder (< 4)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (0.43.0)
parser (>= 2.3.1.1, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.8.1)
sass (3.4.22)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
Expand All @@ -203,22 +291,34 @@ GEM
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
term-ansicolor (1.3.2)
tins (~> 1.0)
terminal-table (1.7.3)
unicode-display_width (~> 1.1.1)
thor (0.19.1)
thread (0.2.2)
thread_safe (0.3.5)
tilt (2.0.5)
tins (1.12.0)
turbolinks (5.0.1)
turbolinks-source (~> 5)
turbolinks-source (5.0.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (3.0.2)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.1.1)
url (0.3.2)
virtus (1.0.5)
axiom-types (~> 0.1)
coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3)
equalizer (~> 0.0, >= 0.0.9)
warden (1.2.6)
rack (>= 1.0)
websocket-driver (0.6.4)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
wisper (1.6.1)
wisper-rspec (0.0.2)
xpath (2.0.0)
nokogiri (~> 1.3)

Expand All @@ -230,19 +330,20 @@ DEPENDENCIES
byebug
capybara (~> 2.4)
codecov
coffee-rails (~> 4.2)
database_cleaner (~> 1.5.0)
decidim!
jbuilder (~> 2.5)
jquery-rails
decidim-core!
factory_girl_rails
foundation_rails_helper!
i18n-tasks (~> 0.9.5)
listen
pg
rake (~> 10.0)
rake (~> 11.0)
rspec (~> 3.0)
rspec-rails (~> 3.5)
rspec_junit_formatter (= 0.2.3)
sass-rails (~> 5.0)
turbolinks (~> 5)
uglifier (>= 1.3.0)
rubocop
wisper-rspec

RUBY VERSION
ruby 2.3.1p112
Expand Down
15 changes: 3 additions & 12 deletions Rakefile
Expand Up @@ -8,26 +8,17 @@ rescue LoadError
raise "Could not find decidim/testing_support/common_rake. You need to run this command using Bundler."
end

DECIDIM_GEMS = %w(core).freeze
DECIDIM_GEMS = %w(core system).freeze

RSpec::Core::RakeTask.new(:spec)

task default: :test

desc "Runs all tests in all Decidim engines"
task test: :test_app do
task :test do
DECIDIM_GEMS.each do |gem_name|
Dir.chdir("#{File.dirname(__FILE__)}/decidim-#{gem_name}") do
sh "rspec"
end
end
end

desc "Generates a dummy app for testing for every Decidim engine"
task :test_app do
DECIDIM_GEMS.each do |gem_name|
Dir.chdir("#{File.dirname(__FILE__)}/decidim-#{gem_name}") do
sh "rake test_app"
sh "rake"
end
end
end
Expand Down
21 changes: 3 additions & 18 deletions common_gemfile.rb
@@ -1,24 +1,9 @@
# frozen_string_literal: true
source "https://rubygems.org"

ruby '2.3.1'
ruby "2.3.1"

gem "pg"
gem "listen"

# Rails 5 deps
gem "sass-rails", "~> 5.0"
gem "uglifier", ">= 1.3.0"
gem "coffee-rails", "~> 4.2"
gem "jquery-rails"
gem "turbolinks", "~> 5"
gem "jbuilder", "~> 2.5"

group :development do
gem "byebug"
gem "listen"
end

group :test do
gem "capybara", "~> 2.4"
gem "rspec-rails", "~> 3.5"
end
gem "foundation_rails_helper", github: "sgruhier/foundation_rails_helper"
3 changes: 3 additions & 0 deletions decidim-core/Gemfile
Expand Up @@ -13,3 +13,6 @@ gemspec

# To use a debugger
# gem 'byebug', group: [:development, :test]

gemspec path: "../decidim-system"
gemspec path: ".."

0 comments on commit b128007

Please sign in to comment.