gruff 0.11.0-java → 0.14.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +66 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +24 -8
- data/.rubocop_todo.yml +57 -53
- data/CHANGELOG.md +34 -0
- data/README.md +15 -7
- data/assets/fonts/LICENSE.txt +202 -0
- data/assets/fonts/Roboto-Bold.ttf +0 -0
- data/assets/fonts/Roboto-Regular.ttf +0 -0
- data/gruff.gemspec +8 -5
- data/lib/gruff.rb +9 -3
- data/lib/gruff/accumulator_bar.rb +3 -3
- data/lib/gruff/area.rb +5 -12
- data/lib/gruff/bar.rb +43 -47
- data/lib/gruff/base.rb +267 -146
- data/lib/gruff/bezier.rb +4 -10
- data/lib/gruff/bullet.rb +13 -19
- data/lib/gruff/dot.rb +14 -19
- data/lib/gruff/font.rb +39 -0
- data/lib/gruff/helper/bar_conversion.rb +28 -13
- data/lib/gruff/helper/bar_value_label.rb +68 -0
- data/lib/gruff/helper/stacked_mixin.rb +1 -2
- data/lib/gruff/histogram.rb +9 -8
- data/lib/gruff/line.rb +59 -56
- data/lib/gruff/mini/bar.rb +10 -7
- data/lib/gruff/mini/legend.rb +19 -10
- data/lib/gruff/mini/pie.rb +10 -8
- data/lib/gruff/mini/side_bar.rb +10 -8
- data/lib/gruff/net.rb +13 -20
- data/lib/gruff/patch/rmagick.rb +22 -24
- data/lib/gruff/patch/string.rb +7 -4
- data/lib/gruff/pie.rb +24 -70
- data/lib/gruff/renderer/bezier.rb +11 -11
- data/lib/gruff/renderer/circle.rb +11 -11
- data/lib/gruff/renderer/dash_line.rb +12 -12
- data/lib/gruff/renderer/dot.rb +16 -16
- data/lib/gruff/renderer/ellipse.rb +11 -11
- data/lib/gruff/renderer/line.rb +12 -12
- data/lib/gruff/renderer/polygon.rb +13 -13
- data/lib/gruff/renderer/polyline.rb +11 -11
- data/lib/gruff/renderer/rectangle.rb +9 -9
- data/lib/gruff/renderer/renderer.rb +23 -50
- data/lib/gruff/renderer/text.rb +32 -29
- data/lib/gruff/scatter.rb +52 -76
- data/lib/gruff/scene.rb +15 -14
- data/lib/gruff/side_bar.rb +49 -52
- data/lib/gruff/side_stacked_bar.rb +29 -20
- data/lib/gruff/spider.rb +13 -22
- data/lib/gruff/stacked_area.rb +10 -16
- data/lib/gruff/stacked_bar.rb +29 -18
- data/lib/gruff/store/{base_data.rb → basic_data.rb} +5 -7
- data/lib/gruff/store/custom_data.rb +4 -6
- data/lib/gruff/store/store.rb +9 -12
- data/lib/gruff/store/xy_data.rb +6 -7
- data/lib/gruff/themes.rb +6 -6
- data/lib/gruff/version.rb +1 -1
- data/rails_generators/gruff/templates/controller.rb +1 -1
- metadata +24 -14
- data/.travis.yml +0 -26
- data/Rakefile +0 -47
- data/assets/plastik/blue.png +0 -0
- data/assets/plastik/green.png +0 -0
- data/assets/plastik/red.png +0 -0
- data/docker/Dockerfile +0 -14
- data/docker/build.sh +0 -4
- data/docker/launch.sh +0 -4
- data/lib/gruff/helper/bar_value_label_mixin.rb +0 -30
- data/lib/gruff/photo_bar.rb +0 -97
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49e695ac5551cf4ec68c09c9d272219433df913f0871cf108373fabffc73492f
|
4
|
+
data.tar.gz: 7724a089b1d53c511511301cb184af87a2fbe6ce92a9836fc053df5e7c39005a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba0f075b7a210e181b7a503bc1701cd43b618ba043dc44d2ef9c24d7db212687a840b8e92083c9e92d9d69d50f83d34d7b02ea4d2d0c33d1705abca2a18566d9
|
7
|
+
data.tar.gz: ce4e553a52dd6a1c85bf5fbcca5f37bebe4c9961627c213f96c10be08e611551a7c2927f3422a733208fd33363cd2767b8b0eab042d9de4707e2b4e8d82644d4
|
@@ -0,0 +1,66 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
lint:
|
11
|
+
runs-on: ubuntu-18.04
|
12
|
+
timeout-minutes: 20
|
13
|
+
name: Lint
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v2
|
16
|
+
with:
|
17
|
+
ref: ${{ github.event.pull_request.head.sha }}
|
18
|
+
- name: Set up Ruby 2.4
|
19
|
+
uses: ruby/setup-ruby@master
|
20
|
+
with:
|
21
|
+
ruby-version: '2.4'
|
22
|
+
bundler-cache: true
|
23
|
+
- name: Install dependencies
|
24
|
+
run: bundle install --path=vendor/bundle --jobs 4 --retry 3
|
25
|
+
- name: RuboCop Problem Matchers
|
26
|
+
uses: r7kamura/rubocop-problem-matchers-action@v1.1.0
|
27
|
+
- name: Run tests
|
28
|
+
run: bundle exec rubocop
|
29
|
+
|
30
|
+
test-ruby:
|
31
|
+
runs-on: ubuntu-18.04
|
32
|
+
timeout-minutes: 20
|
33
|
+
strategy:
|
34
|
+
matrix:
|
35
|
+
ruby-version: ['2.4', '2.5', '2.6', '2.7', '3.0']
|
36
|
+
name: Ruby ${{ matrix.ruby-version }}
|
37
|
+
steps:
|
38
|
+
- uses: actions/checkout@v2
|
39
|
+
- name: Set up Ruby
|
40
|
+
uses: ruby/setup-ruby@master
|
41
|
+
with:
|
42
|
+
ruby-version: ${{ matrix.ruby-version }}
|
43
|
+
bundler-cache: true
|
44
|
+
- name: Install dependencies
|
45
|
+
run: bundle install --path=vendor/bundle --jobs 4 --retry 3
|
46
|
+
- name: Run tests
|
47
|
+
run: bundle exec rake
|
48
|
+
|
49
|
+
test-jruby:
|
50
|
+
runs-on: ubuntu-18.04
|
51
|
+
timeout-minutes: 20
|
52
|
+
strategy:
|
53
|
+
matrix:
|
54
|
+
ruby-version: ['9.2.19.0']
|
55
|
+
name: JRuby ${{ matrix.ruby-version }}
|
56
|
+
steps:
|
57
|
+
- uses: actions/checkout@v2
|
58
|
+
- name: Set up Ruby
|
59
|
+
uses: ruby/setup-ruby@master
|
60
|
+
with:
|
61
|
+
ruby-version: jruby-${{ matrix.ruby-version }}
|
62
|
+
bundler-cache: true
|
63
|
+
- name: Install dependencies
|
64
|
+
run: bundle install --path=vendor/bundle --jobs 4 --retry 3
|
65
|
+
- name: Run tests
|
66
|
+
run: bundle exec rake
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
inherit_from: .rubocop_todo.yml
|
2
|
+
require:
|
3
|
+
- rubocop-performance
|
4
|
+
- rubocop-rake
|
2
5
|
|
3
6
|
AllCops:
|
4
7
|
EnabledByDefault: true
|
8
|
+
TargetRubyVersion: 2.4
|
5
9
|
Exclude:
|
6
10
|
- 'vendor/bundle/**/*'
|
7
11
|
- 'rails_generators/gruff/**/*'
|
@@ -10,7 +14,7 @@ Gemspec/OrderedDependencies:
|
|
10
14
|
Enabled: false
|
11
15
|
|
12
16
|
Gemspec/RequiredRubyVersion:
|
13
|
-
Enabled:
|
17
|
+
Enabled: true
|
14
18
|
|
15
19
|
Layout/AccessModifierIndentation:
|
16
20
|
EnforcedStyle: outdent
|
@@ -21,8 +25,8 @@ Layout/ClassStructure:
|
|
21
25
|
Layout/FirstMethodArgumentLineBreak:
|
22
26
|
Enabled: false
|
23
27
|
|
24
|
-
Layout/
|
25
|
-
|
28
|
+
Layout/LineLength:
|
29
|
+
Max: 150
|
26
30
|
|
27
31
|
Layout/MultilineMethodArgumentLineBreaks:
|
28
32
|
Enabled: false
|
@@ -33,9 +37,18 @@ Layout/MultilineAssignmentLayout:
|
|
33
37
|
Lint/AssignmentInCondition:
|
34
38
|
Enabled: false
|
35
39
|
|
40
|
+
Lint/ConstantResolution:
|
41
|
+
Enabled: false
|
42
|
+
|
36
43
|
Lint/NumberConversion:
|
37
44
|
Enabled: false
|
38
45
|
|
46
|
+
Naming/MethodParameterName:
|
47
|
+
Enabled: false
|
48
|
+
|
49
|
+
Style/AccessorGrouping:
|
50
|
+
Enabled: false
|
51
|
+
|
39
52
|
Style/ClassAndModuleChildren:
|
40
53
|
Enabled: false
|
41
54
|
|
@@ -48,8 +61,8 @@ Style/ConstantVisibility:
|
|
48
61
|
Style/Copyright:
|
49
62
|
Enabled: false
|
50
63
|
|
51
|
-
Style/
|
52
|
-
Enabled:
|
64
|
+
Style/Documentation:
|
65
|
+
Enabled: true
|
53
66
|
|
54
67
|
Style/FormatString:
|
55
68
|
EnforcedStyle: sprintf
|
@@ -78,9 +91,6 @@ Style/MethodCallWithArgsParentheses:
|
|
78
91
|
Style/MissingElse:
|
79
92
|
Enabled: false
|
80
93
|
|
81
|
-
Style/MutableConstant:
|
82
|
-
Enabled: false
|
83
|
-
|
84
94
|
Style/Next:
|
85
95
|
Enabled: false
|
86
96
|
|
@@ -93,6 +103,9 @@ Style/NumericPredicate:
|
|
93
103
|
Style/OptionHash:
|
94
104
|
Enabled: false
|
95
105
|
|
106
|
+
Style/RedundantBegin:
|
107
|
+
Enabled: false
|
108
|
+
|
96
109
|
Style/SingleLineBlockParams:
|
97
110
|
Enabled: false
|
98
111
|
|
@@ -107,3 +120,6 @@ Style/SymbolArray:
|
|
107
120
|
|
108
121
|
Style/TernaryParentheses:
|
109
122
|
Enabled: false
|
123
|
+
|
124
|
+
Performance/ChainArrayAllocation:
|
125
|
+
Enabled: false
|
data/.rubocop_todo.yml
CHANGED
@@ -1,25 +1,18 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2021-07-11 06:52:14 UTC using RuboCop version 1.12.1.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
10
|
-
Lint/
|
11
|
-
Exclude:
|
12
|
-
- 'lib/gruff/photo_bar.rb'
|
13
|
-
|
14
|
-
# Offense count: 1
|
15
|
-
Lint/UnreachableCode:
|
16
|
-
Exclude:
|
17
|
-
- 'lib/gruff/photo_bar.rb'
|
18
|
-
|
19
|
-
# Offense count: 1
|
20
|
-
Lint/UselessAssignment:
|
9
|
+
# Offense count: 13
|
10
|
+
Lint/FloatComparison:
|
21
11
|
Exclude:
|
22
|
-
- '
|
12
|
+
- 'Rakefile'
|
13
|
+
- 'lib/gruff/base.rb'
|
14
|
+
- 'lib/gruff/renderer/renderer.rb'
|
15
|
+
- 'lib/gruff/scatter.rb'
|
23
16
|
|
24
17
|
# Offense count: 1
|
25
18
|
# Configuration parameters: CheckForMethodsWithNoSideEffects.
|
@@ -27,41 +20,41 @@ Lint/Void:
|
|
27
20
|
Exclude:
|
28
21
|
- 'lib/gruff/patch/rmagick.rb'
|
29
22
|
|
30
|
-
# Offense count:
|
31
|
-
# Configuration parameters: IgnoredMethods.
|
23
|
+
# Offense count: 57
|
24
|
+
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
|
32
25
|
Metrics/AbcSize:
|
33
|
-
Max:
|
26
|
+
Max: 66
|
34
27
|
|
35
|
-
# Offense count:
|
36
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
37
|
-
#
|
28
|
+
# Offense count: 3
|
29
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
30
|
+
# IgnoredMethods: refine
|
38
31
|
Metrics/BlockLength:
|
39
|
-
Max:
|
32
|
+
Max: 32
|
40
33
|
|
41
|
-
# Offense count:
|
42
|
-
# Configuration parameters: CountComments.
|
34
|
+
# Offense count: 14
|
35
|
+
# Configuration parameters: CountComments, CountAsOne.
|
43
36
|
Metrics/ClassLength:
|
44
|
-
Max:
|
37
|
+
Max: 683
|
45
38
|
|
46
|
-
# Offense count:
|
39
|
+
# Offense count: 8
|
47
40
|
# Configuration parameters: IgnoredMethods.
|
48
41
|
Metrics/CyclomaticComplexity:
|
49
42
|
Max: 17
|
50
43
|
|
51
|
-
# Offense count:
|
52
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
44
|
+
# Offense count: 134
|
45
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
53
46
|
Metrics/MethodLength:
|
54
47
|
Max: 81
|
55
48
|
|
56
|
-
# Offense count:
|
57
|
-
# Configuration parameters: CountKeywordArgs.
|
49
|
+
# Offense count: 3
|
50
|
+
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
|
58
51
|
Metrics/ParameterLists:
|
59
52
|
Max: 7
|
60
53
|
|
61
|
-
# Offense count:
|
54
|
+
# Offense count: 6
|
62
55
|
# Configuration parameters: IgnoredMethods.
|
63
56
|
Metrics/PerceivedComplexity:
|
64
|
-
Max:
|
57
|
+
Max: 19
|
65
58
|
|
66
59
|
# Offense count: 1
|
67
60
|
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
|
@@ -70,43 +63,54 @@ Naming/MemoizedInstanceVariableName:
|
|
70
63
|
Exclude:
|
71
64
|
- 'lib/gruff/scene.rb'
|
72
65
|
|
73
|
-
# Offense count:
|
74
|
-
# Configuration parameters:
|
75
|
-
#
|
76
|
-
|
66
|
+
# Offense count: 6
|
67
|
+
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers.
|
68
|
+
# SupportedStyles: snake_case, normalcase, non_integer
|
69
|
+
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
|
70
|
+
Naming/VariableNumber:
|
77
71
|
Exclude:
|
78
|
-
- '
|
79
|
-
- '
|
80
|
-
- '
|
81
|
-
- 'lib/gruff/renderer/text.rb'
|
72
|
+
- 'test/test_bar.rb'
|
73
|
+
- 'test/test_bezier.rb'
|
74
|
+
- 'test/test_line.rb'
|
82
75
|
|
83
76
|
# Offense count: 2
|
77
|
+
# Cop supports --auto-correct.
|
78
|
+
Performance/StringReplacement:
|
79
|
+
Exclude:
|
80
|
+
- 'lib/gruff/scene.rb'
|
81
|
+
|
82
|
+
# Offense count: 1
|
83
|
+
Rake/Desc:
|
84
|
+
Exclude:
|
85
|
+
- 'Rakefile'
|
86
|
+
|
87
|
+
# Offense count: 1
|
84
88
|
Security/Eval:
|
85
89
|
Exclude:
|
86
90
|
- 'test/gruff_test_case.rb'
|
87
91
|
|
88
|
-
# Offense count:
|
89
|
-
Style/
|
90
|
-
|
92
|
+
# Offense count: 1
|
93
|
+
Style/CombinableLoops:
|
94
|
+
Exclude:
|
95
|
+
- 'test/test_line.rb'
|
91
96
|
|
92
|
-
# Offense count:
|
97
|
+
# Offense count: 2
|
98
|
+
Style/DocumentDynamicEvalDefinition:
|
99
|
+
Exclude:
|
100
|
+
- 'test/gruff_test_case.rb'
|
101
|
+
|
102
|
+
# Offense count: 97
|
93
103
|
# Configuration parameters: RequireForNonPublicMethods.
|
94
104
|
Style/DocumentationMethod:
|
95
105
|
Enabled: false
|
96
106
|
|
97
|
-
# Offense count: 3
|
98
|
-
Style/EvalWithLocation:
|
99
|
-
Exclude:
|
100
|
-
- 'test/gruff_test_case.rb'
|
101
|
-
|
102
107
|
# Offense count: 1
|
103
108
|
Style/MissingRespondToMissing:
|
104
109
|
Exclude:
|
105
110
|
- 'lib/gruff/scene.rb'
|
106
111
|
|
107
|
-
# Offense count:
|
112
|
+
# Offense count: 2
|
108
113
|
# Cop supports --auto-correct.
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
Max: 164
|
114
|
+
Style/StringConcatenation:
|
115
|
+
Exclude:
|
116
|
+
- 'test/gruff_test_case.rb'
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,39 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 0.14.0
|
4
|
+
- Update rails template (#547)
|
5
|
+
- Remove singleton in order to support multi-thread processing (#546)
|
6
|
+
- Fix bug in Gruff::Scatter that X coordinate value is wrong if set value in x_axis_increment (#534)
|
7
|
+
- Add marker_x_count attribute in Gruff::Line (#532)
|
8
|
+
- Add label_formatting attribute in Gruff::Pie (#531)
|
9
|
+
- Removed the ability to inject custom PieSlice classes from the outside (#530)
|
10
|
+
- Remove Gruff::PhotoBar (#513)
|
11
|
+
- Deprecate last_series_goes_on_bottom attribute in Gruff::StackedArea (#512)
|
12
|
+
|
13
|
+
## 0.13.0
|
14
|
+
- Allow to customize label value with lambda (#510)
|
15
|
+
- Rename enable_vertical_line_markers attribute to show_vertical_markers (#509)
|
16
|
+
- Fix error that cause ArgumentError with x_axis_increment in Gruff::Scatter (#506)
|
17
|
+
- Fix draw_label that it should follow label_truncation_style setting (#505)
|
18
|
+
- Deprecate use_data_label attribute from SideBar (#504)
|
19
|
+
- Add negative values graph support in Gruff::SideBar (#499)
|
20
|
+
- Add margin of axis in order to avoid overwriting the coordinate axes (#497)
|
21
|
+
- Fix get_type_metrics error (#496)
|
22
|
+
- Embed Roboto as default font (#495)
|
23
|
+
- Fix legend rendering position when it enable legend_at_bottom (#492)
|
24
|
+
|
25
|
+
## 0.12.2
|
26
|
+
- Avoid SEGV caused with '%S' in Draw#get_type_metrics by old ImageMagick (6.9.9 or below) (#490)
|
27
|
+
|
28
|
+
## 0.12.0
|
29
|
+
- Mark Gruff::Base#to_blob as deprecated (#473)
|
30
|
+
- Add Gruff::Base#to_image method (#472)
|
31
|
+
- Drop support of Ruby v2.3.x or below (#453, #448)
|
32
|
+
- add hide_labels to stacked side bar graphs (#452)
|
33
|
+
- add hide_labels to side bar graphs (#451)
|
34
|
+
- add hide_labels to stacked bar graphs (#450)
|
35
|
+
- support hide_labels separate from hide_line_markers for bar graphs only (#446)
|
36
|
+
|
3
37
|
## 0.11.0
|
4
38
|
- Fix regression in empty data handling (#445)
|
5
39
|
- Rendering text in front most (#439)
|
data/README.md
CHANGED
@@ -28,6 +28,9 @@ Or install it yourself as:
|
|
28
28
|
$ gem install gruff
|
29
29
|
```
|
30
30
|
|
31
|
+
## Font
|
32
|
+
Gruff uses [Roboto](https://fonts.google.com/specimen/Roboto) font as default font which is licensed under the Apache License, Version 2.0.
|
33
|
+
|
31
34
|
## Usage
|
32
35
|
|
33
36
|
```ruby
|
@@ -130,24 +133,29 @@ http://www.rubydoc.info/github/topfunky/gruff/frames
|
|
130
133
|
|
131
134
|
## Supported Ruby Versions
|
132
135
|
|
133
|
-
|
134
|
-
|
136
|
+
- Ruby 2.4 or later
|
137
|
+
- JRuby 9.2.x or later
|
135
138
|
|
136
|
-
## Development
|
139
|
+
## Development
|
137
140
|
1. Build docker image
|
138
141
|
```sh
|
139
|
-
$ ./docker
|
142
|
+
$ ./docker-build.sh
|
140
143
|
```
|
141
144
|
|
142
145
|
2. Launch docker image
|
143
146
|
```sh
|
144
|
-
$ ./docker
|
147
|
+
$ ./docker-launch.sh
|
145
148
|
```
|
146
149
|
|
147
150
|
3. Run tests
|
148
151
|
```sh
|
149
|
-
$
|
150
|
-
|
152
|
+
$ rake
|
153
|
+
```
|
154
|
+
|
155
|
+
If you have made changes that involve updating the expected image, you need to update the image with the following command after running tests.
|
156
|
+
|
157
|
+
```sh
|
158
|
+
$ rake test:image:update
|
151
159
|
```
|
152
160
|
|
153
161
|
## Contributing
|
@@ -0,0 +1,202 @@
|
|
1
|
+
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
5
|
+
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
+
|
8
|
+
1. Definitions.
|
9
|
+
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
+
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
+
the copyright owner that is granting the License.
|
15
|
+
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
+
other entities that control, are controlled by, or are under common
|
18
|
+
control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
20
|
+
direction or management of such entity, whether by contract or
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
+
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
+
exercising permissions granted by this License.
|
26
|
+
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
28
|
+
including but not limited to software source code, documentation
|
29
|
+
source, and configuration files.
|
30
|
+
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
32
|
+
transformation or translation of a Source form, including but
|
33
|
+
not limited to compiled object code, generated documentation,
|
34
|
+
and conversions to other media types.
|
35
|
+
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
37
|
+
Object form, made available under the License, as indicated by a
|
38
|
+
copyright notice that is included in or attached to the work
|
39
|
+
(an example is provided in the Appendix below).
|
40
|
+
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
+
the Work and Derivative Works thereof.
|
48
|
+
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
50
|
+
the original version of the Work and any modifications or additions
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
+
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
65
|
+
subsequently incorporated within the Work.
|
66
|
+
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
73
|
+
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
+
where such license applies only to those patent claims licensable
|
80
|
+
by such Contributor that are necessarily infringed by their
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
83
|
+
institute patent litigation against any entity (including a
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
86
|
+
or contributory patent infringement, then any patent licenses
|
87
|
+
granted to You under this License for that Work shall terminate
|
88
|
+
as of the date such litigation is filed.
|
89
|
+
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
92
|
+
modifications, and in Source or Object form, provided that You
|
93
|
+
meet the following conditions:
|
94
|
+
|
95
|
+
(a) You must give any other recipients of the Work or
|
96
|
+
Derivative Works a copy of this License; and
|
97
|
+
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
99
|
+
stating that You changed the files; and
|
100
|
+
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
103
|
+
attribution notices from the Source form of the Work,
|
104
|
+
excluding those notices that do not pertain to any part of
|
105
|
+
the Derivative Works; and
|
106
|
+
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
109
|
+
include a readable copy of the attribution notices contained
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
112
|
+
of the following places: within a NOTICE text file distributed
|
113
|
+
as part of the Derivative Works; within the Source form or
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
115
|
+
within a display generated by the Derivative Works, if and
|
116
|
+
wherever such third-party notices normally appear. The contents
|
117
|
+
of the NOTICE file are for informational purposes only and
|
118
|
+
do not modify the License. You may add Your own attribution
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
121
|
+
that such additional attribution notices cannot be construed
|
122
|
+
as modifying the License.
|
123
|
+
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
125
|
+
may provide additional or different license terms and conditions
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
129
|
+
the conditions stated in this License.
|
130
|
+
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
134
|
+
this License, without any additional terms or conditions.
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
+
the terms of any separate license agreement you may have executed
|
137
|
+
with Licensor regarding such Contributions.
|
138
|
+
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
141
|
+
except as required for reasonable and customary use in describing the
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
+
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
153
|
+
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
159
|
+
incidental, or consequential damages of any character arising as a
|
160
|
+
result of this License or out of the use or inability to use the
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
163
|
+
other commercial damages or losses), even if such Contributor
|
164
|
+
has been advised of the possibility of such damages.
|
165
|
+
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
+
or other liability obligations and/or rights consistent with this
|
170
|
+
License. However, in accepting such obligations, You may act only
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
175
|
+
of your accepting any such warranty or additional liability.
|
176
|
+
|
177
|
+
END OF TERMS AND CONDITIONS
|
178
|
+
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
180
|
+
|
181
|
+
To apply the Apache License to your work, attach the following
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
183
|
+
replaced with your own identifying information. (Don't include
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
185
|
+
comment syntax for the file format. We also recommend that a
|
186
|
+
file or class name and description of purpose be included on the
|
187
|
+
same "printed page" as the copyright notice for easier
|
188
|
+
identification within third-party archives.
|
189
|
+
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
191
|
+
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
193
|
+
you may not use this file except in compliance with the License.
|
194
|
+
You may obtain a copy of the License at
|
195
|
+
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
197
|
+
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
201
|
+
See the License for the specific language governing permissions and
|
202
|
+
limitations under the License.
|