rubiclifier 1.2.0 → 2.0.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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 55728a2ee2075c6e1f9dff351518b86f3fa3723697724e690bfd42d5e88a86e4
|
|
4
|
+
data.tar.gz: e506ac9933ce858270541697e10242c6cbd7b1f030174da731036d22dd276e6c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 79b1be94b2c6cdfba1c356cd8ed0e17e12e2ab36b07e1f4b528cb23f024edb2a5af565de5220fb878bdeb3c7ccd7813a9783512ca463816da366886b2555f51a
|
|
7
|
+
data.tar.gz: 1234dc02fc367519b1713ac1987bc76b6c3c4b9d28cf1678a9aa2846644a239367f9c8599c1c65ce3e540efd21e8763401c6d8a846599eb4fa166f7142ff6974
|
data/bin/rubiclifier
CHANGED
data/lib/base_application.rb
CHANGED
|
@@ -5,11 +5,12 @@ require_relative "./setting.rb"
|
|
|
5
5
|
|
|
6
6
|
module Rubiclifier
|
|
7
7
|
class BaseApplication
|
|
8
|
-
attr_reader :args
|
|
9
|
-
private :args
|
|
8
|
+
attr_reader :args, :executable_name
|
|
9
|
+
private :args, :executable_name
|
|
10
10
|
|
|
11
|
-
def initialize(args)
|
|
11
|
+
def initialize(args, executable_name)
|
|
12
12
|
@args = Args.new(args)
|
|
13
|
+
@executable_name = executable_name
|
|
13
14
|
Feature.set_enabled(all_features)
|
|
14
15
|
DB.hydrate(data_directory, migrations_location) if Feature.enabled?(Feature::DATABASE)
|
|
15
16
|
end
|
|
@@ -42,10 +43,6 @@ module Rubiclifier
|
|
|
42
43
|
[]
|
|
43
44
|
end
|
|
44
45
|
|
|
45
|
-
def executable_name
|
|
46
|
-
raise NotImplementedError
|
|
47
|
-
end
|
|
48
|
-
|
|
49
46
|
def data_directory
|
|
50
47
|
raise NotImplementedError if Feature.enabled?(Feature::DATABASE)
|
|
51
48
|
end
|
data/lib/cli/rubiclifier_cli.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
require_relative "../rubiclifier.rb"
|
|
2
2
|
|
|
3
3
|
class RubiclifierCli < Rubiclifier::BaseApplication
|
|
4
4
|
attr_reader :project_name
|
|
@@ -14,6 +14,7 @@ class RubiclifierCli < Rubiclifier::BaseApplication
|
|
|
14
14
|
puts(" --background | Generate with background service setup steps")
|
|
15
15
|
puts(" --database | Generate with a persistent database")
|
|
16
16
|
puts(' --homebrew "[first [second]]" | Require specific homebrew kegs')
|
|
17
|
+
puts(" --idle-detection | Generate with ability to detect if user is idle")
|
|
17
18
|
puts(" --notifications | Generate with notification functionality")
|
|
18
19
|
puts(" --settings | Generate with persistent setting functionality")
|
|
19
20
|
puts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
require_relative "../rubiclifier.rb"
|
|
2
2
|
|
|
3
3
|
class TemplateHydrator
|
|
4
4
|
attr_reader :args, :project_name
|
|
@@ -33,6 +33,7 @@ class TemplateHydrator
|
|
|
33
33
|
@features ||= [
|
|
34
34
|
(Rubiclifier::Feature::BACKGROUND if args.boolean("background")),
|
|
35
35
|
(Rubiclifier::Feature::DATABASE if (args.boolean("database") || include_settings?)),
|
|
36
|
+
(Rubiclifier::Feature::IDLE_DETECTION if args.boolean("idle-detection")),
|
|
36
37
|
(Rubiclifier::Feature::NOTIFICATIONS if args.boolean("notifications")),
|
|
37
38
|
].compact
|
|
38
39
|
end
|
|
@@ -36,12 +36,6 @@ class <%= project_name_camel_case %> < Rubiclifier::BaseApplication
|
|
|
36
36
|
]
|
|
37
37
|
end
|
|
38
38
|
<%- end -%>
|
|
39
|
-
<%- if needs_setup? -%>
|
|
40
|
-
|
|
41
|
-
def executable_name
|
|
42
|
-
"<%= project_name %>"
|
|
43
|
-
end
|
|
44
|
-
<%- end -%>
|
|
45
39
|
<%- if feature_enabled?(Rubiclifier::Feature::DATABASE) -%>
|
|
46
40
|
|
|
47
41
|
def data_directory
|