decidim 0.7.4 → 0.8.0
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.
Potentially problematic release.
This version of decidim might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/Gemfile.lock +74 -63
- data/README.md +33 -37
- data/Rakefile +40 -33
- data/docs/getting_started.md +0 -14
- data/docs/managing_translations_i18n.md +24 -0
- data/docs/testing.md +1 -1
- data/docs/view_hooks.md +74 -0
- data/lib/decidim.rb +2 -0
- data/lib/decidim/version.rb +1 -1
- data/lib/generators/decidim/app_generator.rb +9 -15
- data/lib/generators/decidim/docker_generator.rb +12 -14
- data/lib/generators/decidim/install_generator.rb +1 -1
- data/lib/generators/decidim/templates/Dockerfile.erb +1 -1
- data/lib/generators/decidim/templates/docker-compose.yml.erb +2 -23
- metadata +57 -79
- data/.babelrc +0 -17
- data/.circleci/config.yml +0 -387
- data/.codeclimate.yml +0 -57
- data/.csslintrc +0 -2
- data/.decidim-version +0 -1
- data/.dockerignore +0 -5
- data/.editorconfig +0 -9
- data/.eslintignore +0 -15
- data/.eslintrc.json +0 -277
- data/.gitattributes +0 -3
- data/.github/ISSUE_TEMPLATE.md +0 -31
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -16
- data/.gitignore +0 -15
- data/.inch.yml +0 -5
- data/.rubocop.yml +0 -1278
- data/.ruby-version +0 -1
- data/.simplecov +0 -12
- data/.yardopts +0 -8
- data/CHANGELOG.md +0 -1875
- data/CODE_OF_CONDUCT.md +0 -49
- data/Dockerfile.ci +0 -28
- data/codecov.yml +0 -104
- data/config/i18n-tasks.yml +0 -135
- data/crowdin.yaml +0 -3
- data/decidim.gemspec +0 -44
- data/docker-compose.yml +0 -27
- data/jsconfig.json +0 -3
- data/lib/generators/decidim/templates/Dockerfile.dev.erb +0 -21
- data/lib/generators/decidim/templates/decidim/dummy_authorization_handler.rb +0 -27
- data/logo.svg +0 -62
- data/package-lock.json +0 -11607
- data/package.json +0 -108
- data/spec/generator_spec.rb +0 -51
- data/spec/i18n_spec.rb +0 -37
- data/tsconfig.json +0 -21
- data/tslint.json +0 -11
- data/webpack.config.js +0 -82
- data/webpack.d.ts +0 -5
data/package.json
DELETED
@@ -1,108 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "decidim",
|
3
|
-
"version": "0.7.4",
|
4
|
-
"repository": {
|
5
|
-
"url": "git@github.com:decidim/decidim.git",
|
6
|
-
"type": "git"
|
7
|
-
},
|
8
|
-
"author": "Marc Riera <mrc2407@gmail.com>",
|
9
|
-
"license": "AGPLv3",
|
10
|
-
"engines": {
|
11
|
-
"npm": "^5.4.2",
|
12
|
-
"node": "^8.1.4"
|
13
|
-
},
|
14
|
-
"scripts": {
|
15
|
-
"build": "webpack --env.dev",
|
16
|
-
"build:prod": "NODE_ENV=production webpack -p --env.prod",
|
17
|
-
"start": "webpack --env.dev --watch --progress --color --display-error-details",
|
18
|
-
"prelint": "tslint decidim-*/**/*.ts decidim-*/**/*.tsx",
|
19
|
-
"lint": "eslint -c .eslintrc.json --ext .js,.js.es6,.jsx .",
|
20
|
-
"test": "jest",
|
21
|
-
"test:watch": "npm test -- --watch",
|
22
|
-
"test:ci": "npm run lint && npm test",
|
23
|
-
"graphql:download_schema": "apollo-codegen download-schema http://localhost:3000/api --output schema.json",
|
24
|
-
"pregraphql:generate_schema_types": "npm run graphql:download_schema",
|
25
|
-
"graphql:generate_schema_types": "apollo-codegen generate decidim-comments/**/*.graphql --schema schema.json --target typescript --output decidim-comments/app/frontend/support/schema.ts",
|
26
|
-
"postgraphql:generate_schema_types": "rm schema.json"
|
27
|
-
},
|
28
|
-
"devDependencies": {
|
29
|
-
"@types/classnames": "^2.2.3",
|
30
|
-
"@types/enzyme": "^2.8.9",
|
31
|
-
"@types/es6-promise": "^0.0.33",
|
32
|
-
"@types/faker": "^4.1.1",
|
33
|
-
"@types/jest": "^21.1.1",
|
34
|
-
"@types/jquery": "^3.2.12",
|
35
|
-
"@types/react": "^16.0.7",
|
36
|
-
"@types/react-dom": "^15.5.5",
|
37
|
-
"@types/uuid": "^3.4.2",
|
38
|
-
"awesome-typescript-loader": "^3.2.3",
|
39
|
-
"babel-core": "^6.26.0",
|
40
|
-
"babel-eslint": "^8.0.1",
|
41
|
-
"babel-jest": "^21.2.0",
|
42
|
-
"babel-loader": "^7.1.2",
|
43
|
-
"babel-plugin-__coverage__": "~11.0.0",
|
44
|
-
"babel-plugin-transform-decorators-legacy": "~1.3.4",
|
45
|
-
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
|
46
|
-
"babel-preset-airbnb": "^2.4.0",
|
47
|
-
"babel-preset-es2015": "^6.24.1",
|
48
|
-
"babel-preset-react": "^6.24.1",
|
49
|
-
"babel-preset-stage-2": "^6.24.1",
|
50
|
-
"enzyme": "^3.0.0",
|
51
|
-
"enzyme-adapter-react-15": "^1.0.0",
|
52
|
-
"eslint": "^4.7.2",
|
53
|
-
"eslint-loader": "^1.9.0",
|
54
|
-
"eslint-plugin-import": "^2.7.0",
|
55
|
-
"eslint-plugin-jsx-a11y": "^6.0.2",
|
56
|
-
"eslint-plugin-react": "^7.4.0",
|
57
|
-
"expose-loader": "~0.7.1",
|
58
|
-
"faker": "^4.1.0",
|
59
|
-
"jest": "^21.2.1",
|
60
|
-
"json-loader": "~0.5.4",
|
61
|
-
"progress-bar-webpack-plugin": "^1.10.0",
|
62
|
-
"react-addons-test-utils": "^15.6.2",
|
63
|
-
"select2": "^4.0.3",
|
64
|
-
"source-map-loader": "^0.2.1",
|
65
|
-
"ts-jest": "^21.0.1",
|
66
|
-
"tslint": "^5.7.0",
|
67
|
-
"tslint-react": "^3.2.0",
|
68
|
-
"typescript": "^2.5.3",
|
69
|
-
"typescript-babel-jest": "^1.0.4",
|
70
|
-
"webpack": "^3.6.0",
|
71
|
-
"webpack-bundle-analyzer": "^2.9.0",
|
72
|
-
"webpack-config-utils": "~2.3.0",
|
73
|
-
"yaml-jest": "^1.0.5",
|
74
|
-
"yaml-loader": "^0.5.0"
|
75
|
-
},
|
76
|
-
"dependencies": {
|
77
|
-
"apollo-codegen": "^0.17.0-alpha.8",
|
78
|
-
"classnames": "^2.2.5",
|
79
|
-
"graphql-anywhere": "^3.1.0",
|
80
|
-
"graphql-tag": "^2.4.2",
|
81
|
-
"jquery": "^3.2.1",
|
82
|
-
"moment": "^2.18.1",
|
83
|
-
"react": "^15.6.1",
|
84
|
-
"react-addons-update": "^15.6.2",
|
85
|
-
"react-apollo": "^1.4.16",
|
86
|
-
"react-dom": "^15.6.1",
|
87
|
-
"react-i18nify": "^1.8.8",
|
88
|
-
"react-test-renderer": "^15.6.1",
|
89
|
-
"uuid": "^3.1.0"
|
90
|
-
},
|
91
|
-
"jest": {
|
92
|
-
"setupFiles": [
|
93
|
-
"<rootDir>/decidim-comments/app/frontend/entry_test.ts"
|
94
|
-
],
|
95
|
-
"moduleFileExtensions": [
|
96
|
-
"ts",
|
97
|
-
"tsx",
|
98
|
-
"js"
|
99
|
-
],
|
100
|
-
"transform": {
|
101
|
-
"^.+\\.(ts|tsx)$": "typescript-babel-jest",
|
102
|
-
"\\.yml$": "yaml-jest",
|
103
|
-
"\\.(gql|graphql)$": "<rootDir>/decidim-comments/app/frontend/support/graphql_transformer.js",
|
104
|
-
".*": "babel-jest"
|
105
|
-
},
|
106
|
-
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$"
|
107
|
-
}
|
108
|
-
}
|
data/spec/generator_spec.rb
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
describe "Application generation" do
|
4
|
-
let(:status) { system(command, out: File::NULL) }
|
5
|
-
|
6
|
-
let(:test_app) { "spec/generator_test_app" }
|
7
|
-
|
8
|
-
after { FileUtils.rm_rf(test_app) }
|
9
|
-
|
10
|
-
shared_examples_for "a sane generator" do
|
11
|
-
it "successfully generates application" do
|
12
|
-
expect(status).to eq(true)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
before(:all) do
|
17
|
-
system("bundle exec rake install_all")
|
18
|
-
end
|
19
|
-
|
20
|
-
context "without flags" do
|
21
|
-
let(:command) { "decidim #{test_app}" }
|
22
|
-
|
23
|
-
it_behaves_like "a sane generator"
|
24
|
-
end
|
25
|
-
|
26
|
-
context "with --edge flag" do
|
27
|
-
let(:command) { "decidim --edge #{test_app}" }
|
28
|
-
|
29
|
-
it_behaves_like "a sane generator"
|
30
|
-
end
|
31
|
-
|
32
|
-
context "with --branch flag" do
|
33
|
-
let(:command) { "decidim --branch master #{test_app}" }
|
34
|
-
|
35
|
-
it_behaves_like "a sane generator"
|
36
|
-
end
|
37
|
-
|
38
|
-
context "with --path flag" do
|
39
|
-
let(:command) { "decidim --path #{File.expand_path("..", __dir__)} #{test_app}" }
|
40
|
-
|
41
|
-
it_behaves_like "a sane generator"
|
42
|
-
end
|
43
|
-
|
44
|
-
context "development application" do
|
45
|
-
let(:command) do
|
46
|
-
"decidim --path #{File.expand_path("..", __dir__)} #{test_app} --recreate_db --seed_db"
|
47
|
-
end
|
48
|
-
|
49
|
-
it_behaves_like "a sane generator"
|
50
|
-
end
|
51
|
-
end
|
data/spec/i18n_spec.rb
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "i18n/tasks"
|
4
|
-
|
5
|
-
describe "I18n sanity" do
|
6
|
-
let(:locales) do
|
7
|
-
ENV["ENFORCED_LOCALES"].present? ? ENV["ENFORCED_LOCALES"].split(",") : [:en]
|
8
|
-
end
|
9
|
-
|
10
|
-
let(:i18n) { I18n::Tasks::BaseTask.new(locales: locales) }
|
11
|
-
let(:missing_keys) { i18n.missing_keys }
|
12
|
-
let(:unused_keys) { i18n.unused_keys }
|
13
|
-
|
14
|
-
it "does not have missing keys" do
|
15
|
-
expect(missing_keys).to be_empty, "#{missing_keys.inspect} are missing"
|
16
|
-
end
|
17
|
-
|
18
|
-
it "does not have unused keys" do
|
19
|
-
expect(unused_keys).to be_empty, "#{unused_keys.inspect} are unused"
|
20
|
-
end
|
21
|
-
|
22
|
-
it "is normalized" do
|
23
|
-
previous_locale_hashes = locale_hashes
|
24
|
-
i18n.normalize_store!
|
25
|
-
new_locale_hashes = locale_hashes
|
26
|
-
|
27
|
-
expect(previous_locale_hashes).to eq(new_locale_hashes),
|
28
|
-
"Please normalize your locale files with `i18n-tasks normalize`"
|
29
|
-
end
|
30
|
-
|
31
|
-
def locale_hashes
|
32
|
-
Dir.glob("decidim-*/config/locales/**/*.yml").inject({}) do |results, file|
|
33
|
-
md5 = Digest::MD5.file(file).hexdigest
|
34
|
-
results.merge(file => md5)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
data/tsconfig.json
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"compilerOptions": {
|
3
|
-
"sourceMap": true,
|
4
|
-
"noImplicitAny": true,
|
5
|
-
"strictNullChecks": true,
|
6
|
-
"skipLibCheck": true,
|
7
|
-
"module": "commonjs",
|
8
|
-
"target": "es5",
|
9
|
-
"jsx": "react",
|
10
|
-
"moduleResolution": "node"
|
11
|
-
},
|
12
|
-
"includes": [
|
13
|
-
"decidim-comments/app/frontend/**/*.tsx",
|
14
|
-
"decidim-comments/app/frontend/**/*.ts",
|
15
|
-
"webpack.d.ts"
|
16
|
-
],
|
17
|
-
"exclude": [
|
18
|
-
"node_modules",
|
19
|
-
"decidim-comments/app/frontend/entry_test.ts"
|
20
|
-
]
|
21
|
-
}
|
data/tslint.json
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"extends": ["tslint:recommended", "tslint-react"],
|
3
|
-
"rules": {
|
4
|
-
"no-unused-expression": true,
|
5
|
-
"no-var-requires": false,
|
6
|
-
"object-literal-sort-keys": false,
|
7
|
-
"interface-name": [true, "never-prefix"],
|
8
|
-
"max-line-length": [false],
|
9
|
-
"jsx-no-multiline-js": false
|
10
|
-
}
|
11
|
-
}
|
data/webpack.config.js
DELETED
@@ -1,82 +0,0 @@
|
|
1
|
-
const webpack = require('webpack');
|
2
|
-
const webpackConfigUtils = require('webpack-config-utils');
|
3
|
-
const getIfUtils = webpackConfigUtils.getIfUtils;
|
4
|
-
const ProgressBarPlugin = require('progress-bar-webpack-plugin');
|
5
|
-
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
6
|
-
|
7
|
-
module.exports = env => {
|
8
|
-
const envUtils = getIfUtils(env);
|
9
|
-
const ifProd = envUtils.ifProd;
|
10
|
-
const ifTest = envUtils.ifTest;
|
11
|
-
|
12
|
-
const config = {
|
13
|
-
entry: {
|
14
|
-
comments: './decidim-comments/app/frontend/entry.ts'
|
15
|
-
},
|
16
|
-
output: {
|
17
|
-
path: __dirname,
|
18
|
-
filename: 'decidim-[name]/app/assets/javascripts/decidim/[name]/bundle.js'
|
19
|
-
},
|
20
|
-
resolve: {
|
21
|
-
extensions: ['.js', '.jsx', '.ts', '.tsx', '.yml']
|
22
|
-
},
|
23
|
-
devtool: ifProd('source-map', 'eval'),
|
24
|
-
module: {
|
25
|
-
loaders: [
|
26
|
-
{
|
27
|
-
test: /\.jsx?$/,
|
28
|
-
exclude: /node_modules/,
|
29
|
-
loaders: ['babel-loader', 'eslint-loader']
|
30
|
-
},
|
31
|
-
{
|
32
|
-
test: /\.tsx?$/,
|
33
|
-
loaders: ['awesome-typescript-loader']
|
34
|
-
},
|
35
|
-
{
|
36
|
-
test: /\.js.es6$/,
|
37
|
-
loaders: ['babel-loader', 'eslint-loader']
|
38
|
-
},
|
39
|
-
{
|
40
|
-
test: /\.(yml|yaml)$/,
|
41
|
-
loaders: ['json-loader', 'yaml-loader']
|
42
|
-
},
|
43
|
-
{
|
44
|
-
test: /\.(graphql|gql)$/,
|
45
|
-
exclude: /node_modules/,
|
46
|
-
loader: 'graphql-tag/loader'
|
47
|
-
},
|
48
|
-
{
|
49
|
-
test: /\.json$/,
|
50
|
-
loaders: ['json-loader']
|
51
|
-
},
|
52
|
-
{
|
53
|
-
test: require.resolve("react"),
|
54
|
-
loader: "expose-loader?React"
|
55
|
-
},
|
56
|
-
{
|
57
|
-
test: require.resolve("jquery"),
|
58
|
-
loader: "expose-loader?$"
|
59
|
-
}
|
60
|
-
]
|
61
|
-
},
|
62
|
-
plugins: [
|
63
|
-
new ProgressBarPlugin(),
|
64
|
-
new webpack.DefinePlugin({
|
65
|
-
'process.env': {
|
66
|
-
NODE_ENV: ifProd('"production"', '"development"')
|
67
|
-
}
|
68
|
-
}),
|
69
|
-
new BundleAnalyzerPlugin({
|
70
|
-
analyzerMode: ifTest('disabled', 'static'),
|
71
|
-
reportFilename: 'webpack.report.html',
|
72
|
-
openAnalyzer: false
|
73
|
-
})
|
74
|
-
],
|
75
|
-
externals: {
|
76
|
-
'react/addons': 'react',
|
77
|
-
'react/lib/ExecutionEnvironment': 'react',
|
78
|
-
'react/lib/ReactContext': 'react'
|
79
|
-
}
|
80
|
-
};
|
81
|
-
return config;
|
82
|
-
};
|