development 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/development.rb +116 -0
  2. metadata +1 -1
data/lib/development.rb CHANGED
@@ -29,6 +29,15 @@ module ::Development
29
29
  # self.directory #
30
30
  ####################
31
31
 
32
+ ###
33
+ # Return path for directory name.
34
+ #
35
+ # @param directory_name
36
+ #
37
+ # Name of named directory.
38
+ #
39
+ # @return [String] Directory path associated with directory name.
40
+ #
32
41
  def self.directory( directory_name )
33
42
 
34
43
  return @named_directories[ directory_name.to_sym ]
@@ -39,6 +48,11 @@ module ::Development
39
48
  # self.general_load_paths #
40
49
  #############################
41
50
 
51
+ ###
52
+ # Get Array of paths that will be used for general loading purposes if a specific gem path is not given.
53
+ #
54
+ # @return [Array<String>] Paths to be used for general loading purposes.
55
+ #
42
56
  def self.general_load_paths
43
57
 
44
58
  return @general_load_paths
@@ -49,6 +63,11 @@ module ::Development
49
63
  # self.named_directories #
50
64
  ############################
51
65
 
66
+ ###
67
+ # Get Hash of named directory names to paths.
68
+ #
69
+ # @return [Hash{Symbol=>String}]
70
+ #
52
71
  def self.named_directories
53
72
 
54
73
  return @named_directories
@@ -59,6 +78,11 @@ module ::Development
59
78
  # self.enabled_for_all? #
60
79
  ###########################
61
80
 
81
+ ###
82
+ # Query whether Development is set to search in general paths for any gem, even if not explicitly enabled.
83
+ #
84
+ # @return [true,false] Whether general gem search is enabled.
85
+ #
62
86
  def self.enabled_for_all?
63
87
 
64
88
  return @enable_for_all
@@ -69,6 +93,11 @@ module ::Development
69
93
  # self.enabled_gems #
70
94
  #######################
71
95
 
96
+ ###
97
+ # Get gems that have been explicitly enabled.
98
+ #
99
+ # @return [Array<Symbol>] Array of gem or gemset names.
100
+ #
72
101
  def self.enabled_gems
73
102
 
74
103
  return @enabled_gems
@@ -79,6 +108,11 @@ module ::Development
79
108
  # self.disabled_gems #
80
109
  ########################
81
110
 
111
+ ###
112
+ # Get gems that have been explicitly disabled.
113
+ #
114
+ # @return [Array<Symbol>] Array of gem or gemset names.
115
+ #
82
116
  def self.disabled_gems
83
117
 
84
118
  return @disabled_gems
@@ -89,6 +123,11 @@ module ::Development
89
123
  # self.gemsets #
90
124
  ##################
91
125
 
126
+ ###
127
+ # Get hash of gemsets and their gem or gemset members.
128
+ #
129
+ # @return [Hash{Symbol=>Array<Symbol>}] Hash of gemsets and their gem or gemset members.
130
+ #
92
131
  def self.gemsets
93
132
 
94
133
  return @gemsets
@@ -99,6 +138,11 @@ module ::Development
99
138
  # self.locations #
100
139
  ####################
101
140
 
141
+ ###
142
+ # Hash of locations and the gems or gemsets located at each.
143
+ #
144
+ # @return [Hash{Symbol=>Array{String}]
145
+ #
102
146
  def self.locations
103
147
 
104
148
  return @locations
@@ -109,6 +153,15 @@ module ::Development
109
153
  # self.location #
110
154
  ###################
111
155
 
156
+ ###
157
+ # Get gems or gemsets associated with location.
158
+ #
159
+ # @param location_name
160
+ #
161
+ # Name of location.
162
+ #
163
+ # @return [Array<Symbol>]
164
+ #
112
165
  def self.location( location_name )
113
166
 
114
167
  return @locations[ location_name.to_sym ]
@@ -151,6 +204,11 @@ module ::Development
151
204
  # self.clear #
152
205
  ################
153
206
 
207
+ ###
208
+ # Reset internal tracking variables.
209
+ #
210
+ # @return [Development] Self.
211
+ #
154
212
  def self.clear
155
213
 
156
214
  @enabled_gems.clear
@@ -160,6 +218,8 @@ module ::Development
160
218
  @loaded_gems.clear
161
219
  @named_directories.clear
162
220
 
221
+ return self
222
+
163
223
  end
164
224
 
165
225
  ##################################
@@ -425,6 +485,15 @@ module ::Development
425
485
  # self.parse_base_action_from_expression_string #
426
486
  ###################################################
427
487
 
488
+ ###
489
+ # Parse signal character (+, -, =, @, !) and base action string from expression.
490
+ #
491
+ # @param expression_string
492
+ #
493
+ # Expression string.
494
+ #
495
+ # @return [String] Base action string.
496
+ #
428
497
  def self.parse_base_action_from_expression_string( expression_string )
429
498
 
430
499
  base_action = nil
@@ -449,6 +518,23 @@ module ::Development
449
518
  # self.parse_gem_names_from_expression_string #
450
519
  #################################################
451
520
 
521
+ ###
522
+ # Parse gem name list separated by optional comma and white space from expression.
523
+ #
524
+ # @param array
525
+ #
526
+ # Array to add parsed data to.
527
+ #
528
+ # @param expression_string
529
+ #
530
+ # Expression string.
531
+ #
532
+ # @param require_exist [true,false]
533
+ #
534
+ # Raise exception if gems do not exist.
535
+ #
536
+ # @return [Development] Self.
537
+ #
452
538
  def self.parse_gem_names_from_expression_string( array, expression_string, require_exist = false )
453
539
 
454
540
  while next_whitespace_index = expression_string =~ /\s/
@@ -458,6 +544,8 @@ module ::Development
458
544
  # also slice till the end
459
545
  parse_gem_name_from_expression_string( array, expression_string, expression_string.length, require_exist )
460
546
 
547
+ return self
548
+
461
549
  end
462
550
 
463
551
  ################################################
@@ -467,6 +555,10 @@ module ::Development
467
555
  ###
468
556
  # Helper method to slice gem name from expression string and add or subtract from gemset.
469
557
  #
558
+ # @param array
559
+ #
560
+ # Array to add parsed data to.
561
+ #
470
562
  # @param gemset
471
563
  #
472
564
  # Gemset instance.
@@ -479,6 +571,12 @@ module ::Development
479
571
  #
480
572
  # Index to slice expression string to.
481
573
  #
574
+ # @param require_exist [true,false]
575
+ #
576
+ # Raise exception if gems do not exist.
577
+ #
578
+ # @return [Symbol] Parsed gem name.
579
+ #
482
580
  def self.parse_gem_name_from_expression_string( array, expression_string, slice_to_index, require_exist = false )
483
581
 
484
582
  gem_name = expression_string.slice!( 0, slice_to_index )
@@ -532,6 +630,15 @@ module ::Development
532
630
  # self.create_gemset #
533
631
  ########################
534
632
 
633
+ ###
634
+ # Create gemset with name.
635
+ #
636
+ # @param gemset_name
637
+ #
638
+ # Name of gemset.
639
+ #
640
+ # @return [Array] Gemset.
641
+ #
535
642
  def self.create_gemset( gemset_name )
536
643
 
537
644
  gemset_name = gemset_name.to_sym
@@ -548,6 +655,15 @@ module ::Development
548
655
  # self.gemset #
549
656
  #################
550
657
 
658
+ ###
659
+ # Get gemset with name.
660
+ #
661
+ # @param gemset_name
662
+ #
663
+ # Name of gemset.
664
+ #
665
+ # @return [Array] Gemset.
666
+ #
551
667
  def self.gemset( gemset_name )
552
668
 
553
669
  return @gemsets[ gemset_name.to_sym ]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: development
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: