grundstein 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/README.Development.md +9 -0
- data/README.md +2 -2
- data/lib/grundstein/generator/environment.rb +0 -2
- data/lib/grundstein/generator/loader.rb +0 -2
- data/lib/grundstein/generator/repository.rb +0 -2
- data/lib/grundstein/refinements/colored_strings.rb +20 -19
- data/lib/grundstein/runner.rb +0 -2
- data/lib/grundstein/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd40e4f2a1e9d8ea4e54fc678c673c7544cc3f22
|
4
|
+
data.tar.gz: 39cad30f593934815722dd10edc985e8d3ecb530
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8b8ef013200298fffb07955b296020faabede9de7ea76ea4526154ad79c57c1687cd164e233a52755a806e85a130496a27640e486c955c5e1fe43cf80b28814
|
7
|
+
data.tar.gz: de4a7ce312a609fc9ed873c71d2f0a9ad857b06c8685a4370cd810e550e82e61e74b9efee20922d0e1b1a232b990db6750489e3dd618f95a42dd0cd8bb4b1e42
|
data/README.Development.md
CHANGED
@@ -121,6 +121,15 @@ cd myproject/
|
|
121
121
|
RUBYLIB='/vagrant/lib:$RUBYLIB' bin/grundstein add rubocop
|
122
122
|
```
|
123
123
|
|
124
|
+
## Publishing
|
125
|
+
|
126
|
+
```bash
|
127
|
+
gem build grundstein.gemspec
|
128
|
+
gem push grundstein-*.gem
|
129
|
+
#gem install grundstein
|
130
|
+
#gem uninstall grundstein
|
131
|
+
```
|
132
|
+
|
124
133
|
## API documentation
|
125
134
|
|
126
135
|
We are using the [sdoc](https://github.com/voloko/sdoc) generator which is based on [rdoc](https://github.com/rdoc/rdoc).
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Grundstein
|
2
2
|
|
3
|
-
[]()
|
4
4
|
[]()
|
5
5
|
|
6
6
|
I was annoyed to do the same work over and over.
|
@@ -24,7 +24,7 @@ These templates are (in Rails fashion) called generators.
|
|
24
24
|
|
25
25
|
## Installation
|
26
26
|
|
27
|
-
Please make sure you have `git >= 1.7` installed. Then run:
|
27
|
+
Please make sure you have `ruby >= 2.0.0` and `git >= 1.7` installed. Then run:
|
28
28
|
|
29
29
|
```bash
|
30
30
|
gem install grundstein
|
@@ -8,8 +8,6 @@ module Grundstein
|
|
8
8
|
# Then `extend_from_file` is called. This will then load all methods available in that file into this object.
|
9
9
|
# From there on the Loader can interact with the generator (e.g. call `run`)
|
10
10
|
class Environment
|
11
|
-
using Grundstein::Refinements::ColoredStrings
|
12
|
-
|
13
11
|
def initialize
|
14
12
|
@template_vars = {}
|
15
13
|
end
|
@@ -4,8 +4,6 @@ module Grundstein
|
|
4
4
|
# It sets up a Generator::Envrionment and interacts with it.
|
5
5
|
# It is also responsible to determine paths.
|
6
6
|
class Loader
|
7
|
-
using Grundstein::Refinements::ColoredStrings
|
8
|
-
|
9
7
|
SCRIPT_NAME = '_generator.rb'.freeze
|
10
8
|
DIR_EXPECTED_IN_PROJECT_ROOT = '.git'.freeze
|
11
9
|
|
@@ -1,26 +1,27 @@
|
|
1
1
|
require 'highline'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
HighLine.color(self, :blue, :bold)
|
10
|
-
end
|
3
|
+
# We are not using Refinements, so we can support earlier Ruby versions
|
4
|
+
# module Grundstein
|
5
|
+
# module Refinements
|
6
|
+
# # Add namespaced refinement for the color scheme (we are not using HighLine's stuff like `ColorScheme` or `HighLine.colorize_strings`).
|
7
|
+
# module ColoredStrings
|
8
|
+
# refine String do
|
11
9
|
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
# Add namespaced refinement for the color scheme (we are not using HighLine's stuff like `ColorScheme` or `HighLine.colorize_strings`).
|
11
|
+
class String
|
12
|
+
def c_gen
|
13
|
+
HighLine.color(self, :blue, :bold)
|
14
|
+
end
|
15
|
+
|
16
|
+
def c_info
|
17
|
+
HighLine.color(self, :green, :bold)
|
18
|
+
end
|
15
19
|
|
16
|
-
|
17
|
-
|
18
|
-
|
20
|
+
def c_warning
|
21
|
+
HighLine.color(self, :yellow, :bold)
|
22
|
+
end
|
19
23
|
|
20
|
-
|
21
|
-
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
24
|
+
def c_error
|
25
|
+
HighLine.color(self, :red, :bold)
|
25
26
|
end
|
26
27
|
end
|
data/lib/grundstein/runner.rb
CHANGED
@@ -4,8 +4,6 @@ require 'highline/import'
|
|
4
4
|
module Grundstein
|
5
5
|
# Entry point for the command line interface.
|
6
6
|
class Runner < Thor
|
7
|
-
using Grundstein::Refinements::ColoredStrings
|
8
|
-
|
9
7
|
desc :list, 'Lists all available generators.'
|
10
8
|
def list
|
11
9
|
Generator::Repository.instance.generators.each do |name|
|
data/lib/grundstein/version.rb
CHANGED