radon 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +13 -13
- data/.rspec +3 -3
- data/.travis.yml +7 -7
- data/CODE_OF_CONDUCT.md +74 -74
- data/Gemfile +6 -6
- data/Gemfile.lock +40 -40
- data/LICENSE.txt +21 -21
- data/README.md +88 -88
- data/Rakefile +6 -6
- data/bin/console +14 -14
- data/bin/radon +55 -55
- data/bin/setup +8 -8
- data/data/c.b64 +15 -15
- data/data/website.b64 +1 -0
- data/data/website.zip +0 -0
- data/lib/core/constants.rb +1 -1
- data/lib/core/environments.rb +39 -38
- data/lib/core/extract.rb +61 -57
- data/lib/core/text.rb +102 -102
- data/lib/core/util.rb +35 -35
- data/lib/core.rb +11 -11
- data/radon.gemspec +30 -30
- data/scripts/build_install_local.sh +8 -8
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5515b97faa858c1b14972922c8c322293a77c372
|
4
|
+
data.tar.gz: e0a45f9ac9d2f641383b349838a970b8b15cfee0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf83d062b71768802e340cb125a33e485e2acdd1a9175f87148c3fdb68f79ead59847f33eabfc238fb4eb8590d6ec9bc65b477cecb03bb46caa5518fbb28d195
|
7
|
+
data.tar.gz: a4c5bce4416cc1d8e38a82ef386be534091a99d52a4aa9ad3cd7c3b8d77ca97e905192959c89ca1ee5c399fd8460761e4717d1f1e0be2cca9c6ef4be02e78a4f
|
data/.gitignore
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
/.bundle/
|
2
|
-
/.yardoc
|
3
|
-
/_yardoc/
|
4
|
-
/coverage/
|
5
|
-
/doc/
|
6
|
-
/pkg/
|
7
|
-
/spec/reports/
|
8
|
-
/tmp/
|
9
|
-
pkg
|
10
|
-
*.gem
|
11
|
-
|
12
|
-
# rspec failure tracking
|
13
|
-
.rspec_status
|
1
|
+
/.bundle/
|
2
|
+
/.yardoc
|
3
|
+
/_yardoc/
|
4
|
+
/coverage/
|
5
|
+
/doc/
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/tmp/
|
9
|
+
pkg
|
10
|
+
*.gem
|
11
|
+
|
12
|
+
# rspec failure tracking
|
13
|
+
.rspec_status
|
data/.rspec
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
--format documentation
|
2
|
-
--color
|
3
|
-
--require spec_helper
|
1
|
+
--format documentation
|
2
|
+
--color
|
3
|
+
--require spec_helper
|
data/.travis.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
---
|
2
|
-
sudo: false
|
3
|
-
language: ruby
|
4
|
-
cache: bundler
|
5
|
-
rvm:
|
6
|
-
- 2.5.0
|
7
|
-
before_install: gem install bundler -v 1.16.5
|
1
|
+
---
|
2
|
+
sudo: false
|
3
|
+
language: ruby
|
4
|
+
cache: bundler
|
5
|
+
rvm:
|
6
|
+
- 2.5.0
|
7
|
+
before_install: gem install bundler -v 1.16.5
|
data/CODE_OF_CONDUCT.md
CHANGED
@@ -1,74 +1,74 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
17
|
-
* Using welcoming and inclusive language
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
* Gracefully accepting constructive criticism
|
20
|
-
* Focusing on what is best for the community
|
21
|
-
* Showing empathy towards other community members
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
39
|
-
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at cbawsome77@gmail.com. All
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
63
|
-
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
66
|
-
members of the project's leadership.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
-
|
73
|
-
[homepage]: http://contributor-covenant.org
|
74
|
-
[version]: http://contributor-covenant.org/version/1/4/
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at cbawsome77@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
|
4
|
-
|
5
|
-
# Specify your gem's dependencies in radon.gemspec
|
6
|
-
gemspec
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in radon.gemspec
|
6
|
+
gemspec
|
data/Gemfile.lock
CHANGED
@@ -1,40 +1,40 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
radon (0.1.2)
|
5
|
-
paint
|
6
|
-
rubyzip (~> 1.2)
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: https://rubygems.org/
|
10
|
-
specs:
|
11
|
-
diff-lcs (1.3)
|
12
|
-
paint (2.0.1)
|
13
|
-
rake (10.5.0)
|
14
|
-
rspec (3.8.0)
|
15
|
-
rspec-core (~> 3.8.0)
|
16
|
-
rspec-expectations (~> 3.8.0)
|
17
|
-
rspec-mocks (~> 3.8.0)
|
18
|
-
rspec-core (3.8.0)
|
19
|
-
rspec-support (~> 3.8.0)
|
20
|
-
rspec-expectations (3.8.1)
|
21
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
22
|
-
rspec-support (~> 3.8.0)
|
23
|
-
rspec-mocks (3.8.0)
|
24
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
25
|
-
rspec-support (~> 3.8.0)
|
26
|
-
rspec-support (3.8.0)
|
27
|
-
rubyzip (1.2.2)
|
28
|
-
|
29
|
-
PLATFORMS
|
30
|
-
ruby
|
31
|
-
x64-mingw32
|
32
|
-
|
33
|
-
DEPENDENCIES
|
34
|
-
bundler (~> 1.16)
|
35
|
-
radon!
|
36
|
-
rake (~> 10.0)
|
37
|
-
rspec (~> 3.0)
|
38
|
-
|
39
|
-
BUNDLED WITH
|
40
|
-
1.16.5
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
radon (0.1.2)
|
5
|
+
paint
|
6
|
+
rubyzip (~> 1.2)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
diff-lcs (1.3)
|
12
|
+
paint (2.0.1)
|
13
|
+
rake (10.5.0)
|
14
|
+
rspec (3.8.0)
|
15
|
+
rspec-core (~> 3.8.0)
|
16
|
+
rspec-expectations (~> 3.8.0)
|
17
|
+
rspec-mocks (~> 3.8.0)
|
18
|
+
rspec-core (3.8.0)
|
19
|
+
rspec-support (~> 3.8.0)
|
20
|
+
rspec-expectations (3.8.1)
|
21
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
22
|
+
rspec-support (~> 3.8.0)
|
23
|
+
rspec-mocks (3.8.0)
|
24
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
25
|
+
rspec-support (~> 3.8.0)
|
26
|
+
rspec-support (3.8.0)
|
27
|
+
rubyzip (1.2.2)
|
28
|
+
|
29
|
+
PLATFORMS
|
30
|
+
ruby
|
31
|
+
x64-mingw32
|
32
|
+
|
33
|
+
DEPENDENCIES
|
34
|
+
bundler (~> 1.16)
|
35
|
+
radon!
|
36
|
+
rake (~> 10.0)
|
37
|
+
rspec (~> 3.0)
|
38
|
+
|
39
|
+
BUNDLED WITH
|
40
|
+
1.16.5
|
data/LICENSE.txt
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2018 cbrnrd
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 cbrnrd
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,88 +1,88 @@
|
|
1
|
-
<p align="center"><img src="https://raw.githubusercontent.com/cbrnrd/radon/master/img/radon-readme-header.png"></p>
|
2
|
-
<p align="center"><img src="https://raw.githubusercontent.com/cbrnrd/radon/master/img/demo.gif"></p>
|
3
|
-
|
4
|
-
## Installation
|
5
|
-
|
6
|
-
`radon` is part of the [periodic](https://periodic.now.sh) collection of apps. If you install `periodic-cli`, radon should come with it:
|
7
|
-
|
8
|
-
$ gem install periodic-cli
|
9
|
-
|
10
|
-
Or install just the gem:
|
11
|
-
|
12
|
-
$ gem install radon
|
13
|
-
|
14
|
-
## Usage
|
15
|
-
|
16
|
-
The basic usage is as follows: `radon [environment] {ProjectName}`.
|
17
|
-
|
18
|
-
A full list of supported environments can be found by running `radon --list-env`
|
19
|
-
|
20
|
-
#### Example:
|
21
|
-
|
22
|
-
Here is radon generating a gradle project called MyGradleProject
|
23
|
-
```
|
24
|
-
$ radon gradle MyGradleProject
|
25
|
-
Creating project under /mnt/c/Users/Carter/Desktop/projects/MyGradleProject
|
26
|
-
create MyGradleProject
|
27
|
-
create MyGradleProject/.gradle/
|
28
|
-
create MyGradleProject/.gradle/4.5/
|
29
|
-
create MyGradleProject/.gradle/4.5/fileChanges/
|
30
|
-
create MyGradleProject/.gradle/4.5/fileChanges/last-build.bin
|
31
|
-
create MyGradleProject/.gradle/4.5/fileHashes/
|
32
|
-
create MyGradleProject/.gradle/4.5/fileHashes/fileHashes.bin
|
33
|
-
create MyGradleProject/.gradle/4.5/fileHashes/fileHashes.lock
|
34
|
-
create MyGradleProject/.gradle/4.5/taskHistory/
|
35
|
-
create MyGradleProject/.gradle/4.5/taskHistory/taskHistory.bin
|
36
|
-
create MyGradleProject/.gradle/4.5/taskHistory/taskHistory.lock
|
37
|
-
create MyGradleProject/.gradle/buildOutputCleanup/
|
38
|
-
create MyGradleProject/.gradle/buildOutputCleanup/buildOutputCleanup.lock
|
39
|
-
create MyGradleProject/.gradle/buildOutputCleanup/cache.properties
|
40
|
-
create MyGradleProject/.gradle/buildOutputCleanup/outputFiles.bin
|
41
|
-
create MyGradleProject/build.gradle
|
42
|
-
create MyGradleProject/gradle/
|
43
|
-
create MyGradleProject/gradle/wrapper/
|
44
|
-
create MyGradleProject/gradle/wrapper/gradle-wrapper.jar
|
45
|
-
create MyGradleProject/gradle/wrapper/gradle-wrapper.properties
|
46
|
-
create MyGradleProject/gradlew
|
47
|
-
create MyGradleProject/gradlew.bat
|
48
|
-
create MyGradleProject/settings.gradle
|
49
|
-
create MyGradleProject/src/
|
50
|
-
create MyGradleProject/src/main/
|
51
|
-
create MyGradleProject/src/main/java/
|
52
|
-
create MyGradleProject/src/main/test/
|
53
|
-
Done! Your project is set up in /mnt/c/Users/Carter/Desktop/projects/MyGradleProject.
|
54
|
-
```
|
55
|
-
|
56
|
-
## Development
|
57
|
-
|
58
|
-
#### Adding an environment
|
59
|
-
If you want to add an environment to radon, here are the steps:
|
60
|
-
1. Create the standard directory structure of that environment. This is usually found on the environment's website or just through convention.
|
61
|
-
2. Zip all the files into one file (`zip -r env.zip .`)
|
62
|
-
3. Save the zip data as base64 (`cat env.zip | base64 -w 0 > env.b64`)
|
63
|
-
4. Put both the base64 data and the zip file in radon's `/data` folder.
|
64
|
-
5. Add the function(s) in `extract.rb` to extract the _zip_ file to the target (See [here](https://github.com/cbrnrd/radon/blob/7cd141b5a61de6a8abaf0009a1a8cfd090f05e97/lib/core/extract.rb#L5))
|
65
|
-
6. Add the environments to `@@all` in `environments.rb`
|
66
|
-
7. Open a pull request
|
67
|
-
|
68
|
-
If the environment requires a project name (eg. ruby class name or file-names) you can put these token identifiers to be replaced during project creation:
|
69
|
-
|
70
|
-
| Identifier | Meaning |
|
71
|
-
| :-------------: |:-------------:|
|
72
|
-
| `{{NAME}}` | The dash-seperated project name (eg. `my-cool-project`) |
|
73
|
-
| `{{CAPSNAME}}` | The capitalized project name (eg. `MyCoolProject`) |
|
74
|
-
| `{{EMAIL}}` | The email of the user |
|
75
|
-
| `{{GHNAME}}` | The GitHub username of the user |
|
76
|
-
|
77
|
-
|
78
|
-
## Contributing
|
79
|
-
|
80
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/cbrnrd/radon. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
81
|
-
|
82
|
-
## License
|
83
|
-
|
84
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
85
|
-
|
86
|
-
## Code of Conduct
|
87
|
-
|
88
|
-
Everyone interacting in the Radon project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/cbrnrd/radon/blob/master/CODE_OF_CONDUCT.md).
|
1
|
+
<p align="center"><img src="https://raw.githubusercontent.com/cbrnrd/radon/master/img/radon-readme-header.png"></p>
|
2
|
+
<p align="center"><img src="https://raw.githubusercontent.com/cbrnrd/radon/master/img/demo.gif"></p>
|
3
|
+
|
4
|
+
## Installation
|
5
|
+
|
6
|
+
`radon` is part of the [periodic](https://periodic.now.sh) collection of apps. If you install `periodic-cli`, radon should come with it:
|
7
|
+
|
8
|
+
$ gem install periodic-cli
|
9
|
+
|
10
|
+
Or install just the gem:
|
11
|
+
|
12
|
+
$ gem install radon
|
13
|
+
|
14
|
+
## Usage
|
15
|
+
|
16
|
+
The basic usage is as follows: `radon [environment] {ProjectName}`.
|
17
|
+
|
18
|
+
A full list of supported environments can be found by running `radon --list-env`
|
19
|
+
|
20
|
+
#### Example:
|
21
|
+
|
22
|
+
Here is radon generating a gradle project called MyGradleProject
|
23
|
+
```
|
24
|
+
$ radon gradle MyGradleProject
|
25
|
+
Creating project under /mnt/c/Users/Carter/Desktop/projects/MyGradleProject
|
26
|
+
create MyGradleProject
|
27
|
+
create MyGradleProject/.gradle/
|
28
|
+
create MyGradleProject/.gradle/4.5/
|
29
|
+
create MyGradleProject/.gradle/4.5/fileChanges/
|
30
|
+
create MyGradleProject/.gradle/4.5/fileChanges/last-build.bin
|
31
|
+
create MyGradleProject/.gradle/4.5/fileHashes/
|
32
|
+
create MyGradleProject/.gradle/4.5/fileHashes/fileHashes.bin
|
33
|
+
create MyGradleProject/.gradle/4.5/fileHashes/fileHashes.lock
|
34
|
+
create MyGradleProject/.gradle/4.5/taskHistory/
|
35
|
+
create MyGradleProject/.gradle/4.5/taskHistory/taskHistory.bin
|
36
|
+
create MyGradleProject/.gradle/4.5/taskHistory/taskHistory.lock
|
37
|
+
create MyGradleProject/.gradle/buildOutputCleanup/
|
38
|
+
create MyGradleProject/.gradle/buildOutputCleanup/buildOutputCleanup.lock
|
39
|
+
create MyGradleProject/.gradle/buildOutputCleanup/cache.properties
|
40
|
+
create MyGradleProject/.gradle/buildOutputCleanup/outputFiles.bin
|
41
|
+
create MyGradleProject/build.gradle
|
42
|
+
create MyGradleProject/gradle/
|
43
|
+
create MyGradleProject/gradle/wrapper/
|
44
|
+
create MyGradleProject/gradle/wrapper/gradle-wrapper.jar
|
45
|
+
create MyGradleProject/gradle/wrapper/gradle-wrapper.properties
|
46
|
+
create MyGradleProject/gradlew
|
47
|
+
create MyGradleProject/gradlew.bat
|
48
|
+
create MyGradleProject/settings.gradle
|
49
|
+
create MyGradleProject/src/
|
50
|
+
create MyGradleProject/src/main/
|
51
|
+
create MyGradleProject/src/main/java/
|
52
|
+
create MyGradleProject/src/main/test/
|
53
|
+
Done! Your project is set up in /mnt/c/Users/Carter/Desktop/projects/MyGradleProject.
|
54
|
+
```
|
55
|
+
|
56
|
+
## Development
|
57
|
+
|
58
|
+
#### Adding an environment
|
59
|
+
If you want to add an environment to radon, here are the steps:
|
60
|
+
1. Create the standard directory structure of that environment. This is usually found on the environment's website or just through convention.
|
61
|
+
2. Zip all the files into one file (`zip -r env.zip .`)
|
62
|
+
3. Save the zip data as base64 (`cat env.zip | base64 -w 0 > env.b64`)
|
63
|
+
4. Put both the base64 data and the zip file in radon's `/data` folder.
|
64
|
+
5. Add the function(s) in `extract.rb` to extract the _zip_ file to the target (See [here](https://github.com/cbrnrd/radon/blob/7cd141b5a61de6a8abaf0009a1a8cfd090f05e97/lib/core/extract.rb#L5))
|
65
|
+
6. Add the environments to `@@all` in `environments.rb`
|
66
|
+
7. Open a pull request
|
67
|
+
|
68
|
+
If the environment requires a project name (eg. ruby class name or file-names) you can put these token identifiers to be replaced during project creation:
|
69
|
+
|
70
|
+
| Identifier | Meaning |
|
71
|
+
| :-------------: |:-------------:|
|
72
|
+
| `{{NAME}}` | The dash-seperated project name (eg. `my-cool-project`) |
|
73
|
+
| `{{CAPSNAME}}` | The capitalized project name (eg. `MyCoolProject`) |
|
74
|
+
| `{{EMAIL}}` | The email of the user |
|
75
|
+
| `{{GHNAME}}` | The GitHub username of the user |
|
76
|
+
|
77
|
+
|
78
|
+
## Contributing
|
79
|
+
|
80
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/cbrnrd/radon. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
81
|
+
|
82
|
+
## License
|
83
|
+
|
84
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
85
|
+
|
86
|
+
## Code of Conduct
|
87
|
+
|
88
|
+
Everyone interacting in the Radon project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/cbrnrd/radon/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
require "bundler/gem_tasks"
|
2
|
-
require "rspec/core/rake_task"
|
3
|
-
|
4
|
-
RSpec::Core::RakeTask.new(:spec)
|
5
|
-
|
6
|
-
task :default => :spec
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require "rspec/core/rake_task"
|
3
|
+
|
4
|
+
RSpec::Core::RakeTask.new(:spec)
|
5
|
+
|
6
|
+
task :default => :spec
|
data/bin/console
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "radon"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start(__FILE__)
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "radon"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|