fis 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.envrc +1 -0
- data/.envrc.example +1 -0
- data/.gitignore +11 -0
- data/.rspec +4 -0
- data/.rubocop.yml +86 -0
- data/.ruby-version +1 -0
- data/.travis.yml +6 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +159 -0
- data/LICENSE.txt +20 -0
- data/README.md +214 -0
- data/Rakefile +18 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/cucumber.yml +7 -0
- data/exe/fis +18 -0
- data/fis.gemspec +40 -0
- data/lib/fis.rb +55 -0
- data/lib/fis/auth.rb +12 -0
- data/lib/fis/auth/client.rb +44 -0
- data/lib/fis/auth/runner.rb +21 -0
- data/lib/fis/auth/server.rb +35 -0
- data/lib/fis/cli.rb +29 -0
- data/lib/fis/cli/auth.rb +53 -0
- data/lib/fis/cli/commands/login.rb +57 -0
- data/lib/fis/cli/commands/logout.rb +21 -0
- data/lib/fis/cli/commands/whoami.rb +35 -0
- data/lib/fis/client/base.rb +50 -0
- data/lib/fis/client/user.rb +15 -0
- data/lib/fis/command.rb +120 -0
- data/lib/fis/configuration.rb +88 -0
- data/lib/fis/ui.rb +57 -0
- data/lib/fis/version.rb +5 -0
- metadata +221 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d5a85fa858c889d1a1166c4539d14bb525e9f4f36e30cd42f22f056775005a05
|
4
|
+
data.tar.gz: 79d6dfa1a48c3633eef57a84786552505d7d62af11b0b4d82874cb5118ed0274
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ded6adb2c979f7dc637249d6dd7381ed685b45089a15cf33d2e69373337edcc7ad7cecdeb13d8936dfdc0a6b4c35d07667d5cb08504903f3631904d76dc14e7a
|
7
|
+
data.tar.gz: 42abaed32af767e4fc133ff4e8075d6cd2332e58fdfc43b2ed67f498d4284b68791a75647d39d92f1fe1a0f31855a3b14875771900389b8788e79ed711395b79
|
data/.envrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export FIS_CLIENT_BASE_URL="http://localhost:3000"
|
data/.envrc.example
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export LEARN_CO_URL="http://localhost:3000"
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- 'bin/*'
|
4
|
+
- 'db/schema.rb'
|
5
|
+
- 'db/migrate/*'
|
6
|
+
- 'lib/learn_ipc/generated/**/*'
|
7
|
+
|
8
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
9
|
+
Enabled: true
|
10
|
+
|
11
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
12
|
+
EnforcedStyle: space
|
13
|
+
|
14
|
+
Layout/SpaceAroundMethodCallOperator:
|
15
|
+
Enabled: true
|
16
|
+
|
17
|
+
Lint/DeprecatedOpenSSLConstant:
|
18
|
+
Enabled: true
|
19
|
+
|
20
|
+
Lint/MixedRegexpCaptureTypes:
|
21
|
+
Enabled: true
|
22
|
+
|
23
|
+
Lint/RaiseException:
|
24
|
+
Enabled: true
|
25
|
+
|
26
|
+
Lint/StructNewOverride:
|
27
|
+
Enabled: true
|
28
|
+
|
29
|
+
Metrics/BlockLength:
|
30
|
+
ExcludedMethods:
|
31
|
+
- describe
|
32
|
+
- context
|
33
|
+
- it
|
34
|
+
- configure
|
35
|
+
|
36
|
+
Metrics/ClassLength:
|
37
|
+
Max: 150
|
38
|
+
|
39
|
+
Metrics/MethodLength:
|
40
|
+
Max: 15
|
41
|
+
|
42
|
+
Layout/FirstHashElementIndentation:
|
43
|
+
EnforcedStyle: consistent
|
44
|
+
|
45
|
+
Layout/LineLength:
|
46
|
+
Max: 115
|
47
|
+
IgnoredPatterns: ['(\A|\s)#']
|
48
|
+
|
49
|
+
Layout/MultilineMethodCallIndentation:
|
50
|
+
EnforcedStyle: indented
|
51
|
+
|
52
|
+
Style/BlockDelimiters:
|
53
|
+
EnforcedStyle: braces_for_chaining
|
54
|
+
|
55
|
+
Style/Documentation:
|
56
|
+
Include:
|
57
|
+
- app/models/**/*
|
58
|
+
- lib/**/*
|
59
|
+
|
60
|
+
Style/ExponentialNotation:
|
61
|
+
Enabled: false
|
62
|
+
|
63
|
+
Style/HashEachMethods:
|
64
|
+
Enabled: true
|
65
|
+
|
66
|
+
Style/HashTransformKeys:
|
67
|
+
Enabled: true
|
68
|
+
|
69
|
+
Style/HashTransformValues:
|
70
|
+
Enabled: true
|
71
|
+
|
72
|
+
Style/RedundantFetchBlock:
|
73
|
+
Enabled: true
|
74
|
+
SafeForConstants: true
|
75
|
+
|
76
|
+
Style/RedundantRegexpCharacterClass:
|
77
|
+
Enabled: true
|
78
|
+
|
79
|
+
Style/RedundantRegexpEscape:
|
80
|
+
Enabled: true
|
81
|
+
|
82
|
+
Style/SlicingWithRange:
|
83
|
+
Enabled: true
|
84
|
+
|
85
|
+
Style/YodaCondition:
|
86
|
+
EnforcedStyle: require_for_equality_operators_only
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.6.6
|
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +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 tmilewski@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 [https://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: https://contributor-covenant.org
|
74
|
+
[version]: https://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,159 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
fis (0.1.0)
|
5
|
+
faraday (~> 1.1.0)
|
6
|
+
faraday_middleware (~> 1.0.0)
|
7
|
+
oauth2 (~> 1.4.4)
|
8
|
+
sinatra (~> 2.1.0)
|
9
|
+
thin (~> 1.7.2)
|
10
|
+
thor (~> 1.0)
|
11
|
+
tty-config (~> 0.4)
|
12
|
+
tty-link (~> 0.1)
|
13
|
+
tty-prompt (~> 0.22)
|
14
|
+
zeitwerk (~> 2.4.0)
|
15
|
+
|
16
|
+
GEM
|
17
|
+
remote: https://rubygems.org/
|
18
|
+
specs:
|
19
|
+
activesupport (6.0.3.2)
|
20
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
21
|
+
i18n (>= 0.7, < 2)
|
22
|
+
minitest (~> 5.1)
|
23
|
+
tzinfo (~> 1.1)
|
24
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
25
|
+
aruba (1.0.3)
|
26
|
+
childprocess (>= 2.0, < 5.0)
|
27
|
+
contracts (~> 0.16.0)
|
28
|
+
cucumber (>= 2.4, < 6.0)
|
29
|
+
ffi (~> 1.9)
|
30
|
+
rspec-expectations (~> 3.4)
|
31
|
+
thor (~> 1.0)
|
32
|
+
builder (3.2.4)
|
33
|
+
childprocess (4.0.0)
|
34
|
+
concurrent-ruby (1.1.7)
|
35
|
+
contracts (0.16.0)
|
36
|
+
cucumber (5.1.0)
|
37
|
+
builder (~> 3.2, >= 3.2.4)
|
38
|
+
cucumber-core (~> 8.0, >= 8.0.1)
|
39
|
+
cucumber-create-meta (~> 2.0, >= 2.0.1)
|
40
|
+
cucumber-cucumber-expressions (~> 10.3, >= 10.3.0)
|
41
|
+
cucumber-gherkin (~> 15.0, >= 15.0.2)
|
42
|
+
cucumber-html-formatter (~> 9.0, >= 9.0.0)
|
43
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
44
|
+
cucumber-wire (~> 4.0, >= 4.0.1)
|
45
|
+
diff-lcs (~> 1.4, >= 1.4.4)
|
46
|
+
multi_test (~> 0.1, >= 0.1.2)
|
47
|
+
sys-uname (~> 1.2, >= 1.2.1)
|
48
|
+
cucumber-core (8.0.1)
|
49
|
+
cucumber-gherkin (~> 15.0, >= 15.0.2)
|
50
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
51
|
+
cucumber-tag-expressions (~> 2.0, >= 2.0.4)
|
52
|
+
cucumber-create-meta (2.0.1)
|
53
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
54
|
+
sys-uname (~> 1.2, >= 1.2.1)
|
55
|
+
cucumber-cucumber-expressions (10.3.0)
|
56
|
+
cucumber-gherkin (15.0.2)
|
57
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
58
|
+
cucumber-html-formatter (9.0.0)
|
59
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
60
|
+
cucumber-messages (13.0.1)
|
61
|
+
protobuf-cucumber (~> 3.10, >= 3.10.8)
|
62
|
+
cucumber-tag-expressions (2.0.4)
|
63
|
+
cucumber-wire (4.0.1)
|
64
|
+
cucumber-core (~> 8.0, >= 8.0.1)
|
65
|
+
cucumber-cucumber-expressions (~> 10.3, >= 10.3.0)
|
66
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
67
|
+
daemons (1.3.1)
|
68
|
+
diff-lcs (1.4.4)
|
69
|
+
eventmachine (1.2.7)
|
70
|
+
faraday (1.1.0)
|
71
|
+
multipart-post (>= 1.2, < 3)
|
72
|
+
ruby2_keywords
|
73
|
+
faraday_middleware (1.0.0)
|
74
|
+
faraday (~> 1.0)
|
75
|
+
ffi (1.13.1)
|
76
|
+
i18n (1.8.5)
|
77
|
+
concurrent-ruby (~> 1.0)
|
78
|
+
jwt (2.2.2)
|
79
|
+
middleware (0.1.0)
|
80
|
+
minitest (5.14.1)
|
81
|
+
multi_json (1.15.0)
|
82
|
+
multi_test (0.1.2)
|
83
|
+
multi_xml (0.6.0)
|
84
|
+
multipart-post (2.1.1)
|
85
|
+
mustermann (1.1.1)
|
86
|
+
ruby2_keywords (~> 0.0.1)
|
87
|
+
oauth2 (1.4.4)
|
88
|
+
faraday (>= 0.8, < 2.0)
|
89
|
+
jwt (>= 1.0, < 3.0)
|
90
|
+
multi_json (~> 1.3)
|
91
|
+
multi_xml (~> 0.5)
|
92
|
+
rack (>= 1.2, < 3)
|
93
|
+
pastel (0.8.0)
|
94
|
+
tty-color (~> 0.5)
|
95
|
+
protobuf-cucumber (3.10.8)
|
96
|
+
activesupport (>= 3.2)
|
97
|
+
middleware
|
98
|
+
thor
|
99
|
+
thread_safe
|
100
|
+
rack (2.2.3)
|
101
|
+
rack-protection (2.1.0)
|
102
|
+
rack
|
103
|
+
rake (12.3.3)
|
104
|
+
rspec (3.9.0)
|
105
|
+
rspec-core (~> 3.9.0)
|
106
|
+
rspec-expectations (~> 3.9.0)
|
107
|
+
rspec-mocks (~> 3.9.0)
|
108
|
+
rspec-core (3.9.2)
|
109
|
+
rspec-support (~> 3.9.3)
|
110
|
+
rspec-expectations (3.9.2)
|
111
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
112
|
+
rspec-support (~> 3.9.0)
|
113
|
+
rspec-mocks (3.9.1)
|
114
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
115
|
+
rspec-support (~> 3.9.0)
|
116
|
+
rspec-support (3.9.3)
|
117
|
+
ruby2_keywords (0.0.2)
|
118
|
+
sinatra (2.1.0)
|
119
|
+
mustermann (~> 1.0)
|
120
|
+
rack (~> 2.2)
|
121
|
+
rack-protection (= 2.1.0)
|
122
|
+
tilt (~> 2.0)
|
123
|
+
sys-uname (1.2.1)
|
124
|
+
ffi (>= 1.0.0)
|
125
|
+
thin (1.7.2)
|
126
|
+
daemons (~> 1.0, >= 1.0.9)
|
127
|
+
eventmachine (~> 1.0, >= 1.0.4)
|
128
|
+
rack (>= 1, < 3)
|
129
|
+
thor (1.0.1)
|
130
|
+
thread_safe (0.3.6)
|
131
|
+
tilt (2.0.10)
|
132
|
+
tty-color (0.5.2)
|
133
|
+
tty-config (0.4.0)
|
134
|
+
tty-cursor (0.7.1)
|
135
|
+
tty-link (0.1.1)
|
136
|
+
tty-prompt (0.22.0)
|
137
|
+
pastel (~> 0.8)
|
138
|
+
tty-reader (~> 0.8)
|
139
|
+
tty-reader (0.8.0)
|
140
|
+
tty-cursor (~> 0.7)
|
141
|
+
tty-screen (~> 0.8)
|
142
|
+
wisper (~> 2.0)
|
143
|
+
tty-screen (0.8.1)
|
144
|
+
tzinfo (1.2.7)
|
145
|
+
thread_safe (~> 0.1)
|
146
|
+
wisper (2.0.1)
|
147
|
+
zeitwerk (2.4.0)
|
148
|
+
|
149
|
+
PLATFORMS
|
150
|
+
ruby
|
151
|
+
|
152
|
+
DEPENDENCIES
|
153
|
+
aruba (~> 1.0)
|
154
|
+
fis!
|
155
|
+
rake (~> 12.3)
|
156
|
+
rspec (~> 3.9)
|
157
|
+
|
158
|
+
BUNDLED WITH
|
159
|
+
2.1.4
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 Tom Milewski
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
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, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,214 @@
|
|
1
|
+
# FIS
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/fis`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'fis'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle install
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install fis
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/fis. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/fis/blob/master/CODE_OF_CONDUCT.md).
|
36
|
+
|
37
|
+
|
38
|
+
## Code of Conduct
|
39
|
+
|
40
|
+
Everyone interacting in the FIS project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/fis/blob/master/CODE_OF_CONDUCT.md).
|
41
|
+
|
42
|
+
## Copyright
|
43
|
+
|
44
|
+
Copyright (c) 2020 Tom Milewski. See [MIT License](LICENSE.txt) for further details.
|
45
|
+
|
46
|
+
|
47
|
+
## ---------------------------------------------------------------------------------------------
|
48
|
+
|
49
|
+
## Commands
|
50
|
+
|
51
|
+
## OLD ##
|
52
|
+
|
53
|
+
- directory
|
54
|
+
- reset
|
55
|
+
- whoami
|
56
|
+
- hello
|
57
|
+
- lint
|
58
|
+
- open
|
59
|
+
- next
|
60
|
+
- status
|
61
|
+
- submit
|
62
|
+
- save
|
63
|
+
- test
|
64
|
+
- version
|
65
|
+
|
66
|
+
|
67
|
+
## NEW ##
|
68
|
+
|
69
|
+
- auth:login
|
70
|
+
- auth:logout
|
71
|
+
- auth:whoami
|
72
|
+
- profile:status
|
73
|
+
- config:directory
|
74
|
+
- lession:open
|
75
|
+
- lession:lint
|
76
|
+
- lession:submit
|
77
|
+
- lession:test
|
78
|
+
- lession:save
|
79
|
+
- lession:next
|
80
|
+
|
81
|
+
- auth
|
82
|
+
- login
|
83
|
+
- logout
|
84
|
+
- whoami
|
85
|
+
- status
|
86
|
+
- config
|
87
|
+
- directory
|
88
|
+
- lesson
|
89
|
+
- open
|
90
|
+
- lint
|
91
|
+
- submit
|
92
|
+
- test
|
93
|
+
- save
|
94
|
+
- next
|
95
|
+
|
96
|
+
## Existing Structure
|
97
|
+
|
98
|
+
### Base
|
99
|
+
|
100
|
+
CLI: `learn version`
|
101
|
+
Runs: `Learn::VERSION`
|
102
|
+
|
103
|
+
### learn-config (Status: Not Started)
|
104
|
+
|
105
|
+
Configure the Learn.co gem
|
106
|
+
|
107
|
+
- CLI: `learn directory`
|
108
|
+
- Runs: `learn-config --set-directory`
|
109
|
+
|
110
|
+
- CLI: `learn resest`
|
111
|
+
- Runs: `learn-config --reset`
|
112
|
+
|
113
|
+
- CLI: `learn whoami`
|
114
|
+
- Runs: `learn-config --whoami`
|
115
|
+
|
116
|
+
### learn-generate (Status: Not Started)
|
117
|
+
|
118
|
+
Generates labs for Learn.co based on a set of lab templates
|
119
|
+
|
120
|
+
|
121
|
+
### learn-hello (Status: Not Started)
|
122
|
+
|
123
|
+
Checks your connection to Learn.co
|
124
|
+
|
125
|
+
- CLI: `learn hello`
|
126
|
+
- Runs: `learn-hello`
|
127
|
+
|
128
|
+
|
129
|
+
### learn_linter (Status: Not Started)
|
130
|
+
|
131
|
+
can lint a directory for valid .learn, license files
|
132
|
+
|
133
|
+
- CLI: `learn lint`
|
134
|
+
- Runs:
|
135
|
+
```ruby
|
136
|
+
def lint(dir=nil, quiet=nil)
|
137
|
+
if dir && !quiet
|
138
|
+
exec("learn-lint #{dir}")
|
139
|
+
elsif dir && quiet
|
140
|
+
exec("learn-lint #{dir} #{quiet}")
|
141
|
+
elsif !dir && quiet
|
142
|
+
exec("learn-lint #{quiet}")
|
143
|
+
else
|
144
|
+
current_dir = Dir.pwd
|
145
|
+
exec("learn-lint #{current_dir}")
|
146
|
+
end
|
147
|
+
end
|
148
|
+
```
|
149
|
+
|
150
|
+
|
151
|
+
### learn-open (Status: Not Started)
|
152
|
+
|
153
|
+
Open Learn lessons locally
|
154
|
+
|
155
|
+
- CLI: `learn open`
|
156
|
+
- Runs:
|
157
|
+
```ruby
|
158
|
+
lab_name = Learn::Lab::Parser.new(lab_name.join(' ')).parse!
|
159
|
+
editor = options[:editor]
|
160
|
+
clone_only = options[:"clone-only"]
|
161
|
+
|
162
|
+
command = "learn-open #{lab_name} --editor=#{editor}"
|
163
|
+
command << " --clone-only" if clone_only
|
164
|
+
|
165
|
+
exec(command)
|
166
|
+
```
|
167
|
+
|
168
|
+
- CLI: `learn next`
|
169
|
+
- Runs:
|
170
|
+
```ruby
|
171
|
+
editor = options[:editor]
|
172
|
+
clone_only = options[:"clone-only"]
|
173
|
+
|
174
|
+
command = "learn-open --next --editor=#{editor}"
|
175
|
+
command << " --clone-only" if clone_only
|
176
|
+
|
177
|
+
exec(command)
|
178
|
+
```
|
179
|
+
|
180
|
+
|
181
|
+
### learn-status (Status: Not Started)
|
182
|
+
|
183
|
+
Gets your current status from Learn.co
|
184
|
+
|
185
|
+
- CLI: `learn status`
|
186
|
+
- Runs: `learn-status`
|
187
|
+
|
188
|
+
|
189
|
+
### learn-submit (Status: Not Started)
|
190
|
+
|
191
|
+
Submit your lessons to Learn.co
|
192
|
+
|
193
|
+
- CLI: `learn submit`
|
194
|
+
- Runs:
|
195
|
+
```ruby
|
196
|
+
commit_message = if options['team']
|
197
|
+
Learn::TeamMembers::Parser.new(ARGV).execute
|
198
|
+
else
|
199
|
+
options['message']
|
200
|
+
end
|
201
|
+
|
202
|
+
exec("learn-submit #{commit_message}")
|
203
|
+
```
|
204
|
+
|
205
|
+
- CLI: `learn save`
|
206
|
+
- Runs: `learn-submit --save-only`
|
207
|
+
|
208
|
+
|
209
|
+
### learn-test (Status: Not Started)
|
210
|
+
|
211
|
+
Runs RSpec, Karma, Mocha, and Python Pytest Test builds and pushes JSON output to Learn.
|
212
|
+
|
213
|
+
- CLI: `learn [test]`
|
214
|
+
- Runs: `learn-test #{opts.join(' ')}`
|