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: 8d6ce2340c532ee4fb852c7039096830969ea1e45e5de1ad61d1a127fb4b8cec
4
- data.tar.gz: cd172e3bbafc3f12ab49e9604461925c663fa6a2beeb29dd98e0f44815171979
3
+ metadata.gz: 55728a2ee2075c6e1f9dff351518b86f3fa3723697724e690bfd42d5e88a86e4
4
+ data.tar.gz: e506ac9933ce858270541697e10242c6cbd7b1f030174da731036d22dd276e6c
5
5
  SHA512:
6
- metadata.gz: 26e52fec6adaa98607ff9f2c60452689918899dd3fb725a8fe77923682f50aea357327e843468668e000c93020b287111dd69c8516952fa76de777ea3d60cd69
7
- data.tar.gz: a355033e4c0aac8214030b9be3fe1c58210a6578870b93b656186401cc43916f925ad968d2dd3556e75eb0297f8f4e259c9af64623766b8a5a338e23bf285081
6
+ metadata.gz: 79b1be94b2c6cdfba1c356cd8ed0e17e12e2ab36b07e1f4b528cb23f024edb2a5af565de5220fb878bdeb3c7ccd7813a9783512ca463816da366886b2555f51a
7
+ data.tar.gz: 1234dc02fc367519b1713ac1987bc76b6c3c4b9d28cf1678a9aa2846644a239367f9c8599c1c65ce3e540efd21e8763401c6d8a846599eb4fa166f7142ff6974
@@ -2,4 +2,4 @@
2
2
 
3
3
  require_relative "../lib/cli/rubiclifier_cli.rb"
4
4
 
5
- RubiclifierCli.new(ARGV).call
5
+ RubiclifierCli.new(ARGV, __FILE__.split("/").last).call
@@ -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
@@ -1,4 +1,4 @@
1
- require "rubiclifier"
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
- require "rubiclifier"
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
@@ -2,4 +2,4 @@
2
2
 
3
3
  require_relative "../lib/<%= project_name %>.rb"
4
4
 
5
- <%= project_name_camel_case %>.new(ARGV).call
5
+ <%= project_name_camel_case %>.new(ARGV, __FILE__.split("/").last).call
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubiclifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Grinstead