luigi 1.1.1 → 1.1.3

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
  SHA1:
3
- metadata.gz: eb9c443c23215aa8b717726a606085f142a36e11
4
- data.tar.gz: 080fdbdc95c4877d3c320c1c82dd6c6bfcdd6aab
3
+ metadata.gz: 23d53382032166f98fd19b93e68dd968d70dd719
4
+ data.tar.gz: b58c743d51a2027b7254b409c4f3052fd0642514
5
5
  SHA512:
6
- metadata.gz: 24e388051084c5840264995e2ecbfeb7291b72a919d95c8db8063d79f16df5b1ed9703353606ea615ff546360ac652b7a22ef33c474a6f011faf39f039abb10b
7
- data.tar.gz: 5c96278e780ed33ca3a456617f92f7e97b0976c902cf42f1bb18011ab5a1f2bb049aadf2a293e8421396af90a4a94b5d2a91d5636310fc46c254ec4b505cbff7
6
+ metadata.gz: 5008071b53ffb267a691ac8b9b4426a6590c9852f940d27e580df0320d8864c12b11cb3119e4ed98596974f4c6f5b2464fba7e99d957da49689569727cb467a1
7
+ data.tar.gz: 56f7bf6e4953164085fe91cd8b28206b27ff021e05c70c97009ddd89d25a920008118ae6cdf3f2b0cbbd4d31fe181b155792939a072c1904f267f07192c3ac17
@@ -50,7 +50,7 @@ class Luigi < LuigiInternal
50
50
  end
51
51
  return false
52
52
  end
53
-
53
+
54
54
 
55
55
  ##
56
56
  # creates new project_dir and project_file
@@ -71,7 +71,7 @@ class Luigi < LuigiInternal
71
71
 
72
72
  if folder
73
73
  target = File.join folder, name+@file_extension
74
- # project will load template and
74
+ # project will load template and
75
75
  project = @project_class.new({
76
76
  :path => target,
77
77
  :settings => @settings,
@@ -97,7 +97,7 @@ class Luigi < LuigiInternal
97
97
  if dir==:all
98
98
  opened_paths = list_project_files_all
99
99
  else
100
- opened_paths = list_project_files dir, year
100
+ opened_paths = list_project_files dir, year
101
101
  end
102
102
 
103
103
  projects = []
@@ -146,7 +146,7 @@ class Luigi < LuigiInternal
146
146
  # returns opened project
147
147
  # needs to open projects in order to sort
148
148
  def lookup_by_num(num, dir= :working, sort=:date, year= Date.today.year)
149
- projects = _open_projects(dir, sort, year)
149
+ projects = _open_projects(dir, sort, year)
150
150
  projects.each{|p| puts "#{p.date}: #{p.name}" }
151
151
  #num = num.to_i - 1 if num.class == String and num =~ /^\d*$/
152
152
  num = num.to_i - 1
@@ -154,7 +154,7 @@ class Luigi < LuigiInternal
154
154
  @logger.error "there is no project ##{num+1}" if project.nil?
155
155
  return project
156
156
  end
157
-
157
+
158
158
  # opens a project from name
159
159
  # TODO implement archive lookup
160
160
  def open_project_from_name project_name
@@ -166,11 +166,11 @@ class Luigi < LuigiInternal
166
166
  @logger.error "Patherror: #{project_name}"
167
167
  end
168
168
 
169
-
169
+
170
170
  ##
171
171
  # Path to project folder
172
172
  # If the folder exists
173
- # dir can be :working or :archive
173
+ # dir can be :working or :archive
174
174
  #
175
175
  # TODO untested for archives
176
176
  def get_project_folder( name, dir=:working, year=Date.today.year )
@@ -228,11 +228,11 @@ class Luigi < LuigiInternal
228
228
 
229
229
  ##
230
230
  # Move to archive directory
231
- # @name
231
+ # @name
232
232
  ## Luigi.archive_project should use ShellSanitizer
233
233
  def archive_project(project, year = nil, prefix = '')
234
234
  return false unless project.class == @project_class
235
-
235
+
236
236
  year ||= project.date.year
237
237
  year_folder = File.join @dirs[:archive], year.to_s
238
238
  FileUtils.mkdir year_folder unless File.exists? year_folder
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- class ShellSanitizer
3
+ class ShellSanitizer
4
4
  REPLACE_HASH = {
5
5
  ?“ => '"', ?” => '"', ?‘ => "'", ?’ => "'", ?„ => '"',
6
6
 
@@ -24,7 +24,7 @@ class ShellSanitizer
24
24
 
25
25
  ## TODO somebody find me a gem that works and I'll replace this
26
26
  def self.deumlautify(string)
27
- REPLACE_HASH.each{|k,v| string = string.gsub k, v }
27
+ REPLACE_HASH.each{|k,v| string = string.force_encoding("UTF-8").gsub k, v }
28
28
  string.each_char.to_a.keep_if {|c| c.ascii_only?}
29
29
  return string
30
30
  end
@@ -33,8 +33,8 @@ class ShellSanitizer
33
33
  path = path.strip()
34
34
  path = deumlautify path
35
35
  path.sub!(/^\./,'') # removes hidden_file_dot '.' from the begging
36
- path.gsub!(/\//,'_')
37
- path.gsub!(/\//,'_')
36
+ path.gsub!(/\//,'_')
37
+ path.gsub!(/\//,'_')
38
38
  return path
39
39
  end
40
40
 
@@ -37,7 +37,7 @@ module GitPlumber
37
37
  table.add_row [
38
38
  commit.author.name,
39
39
  commit.message,
40
- commit.date.strftime("%H:%M Uhr — %d.%m.%Y"),
40
+ commit.date.strftime("%d.%m.%Y-%H:%M"),
41
41
  ]
42
42
  end
43
43
  puts table
@@ -1,3 +1,3 @@
1
1
  module Luigi
2
- VERSION = '1.1.1'
2
+ VERSION = '1.1.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luigi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hendrik Sollich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-20 00:00:00.000000000 Z
11
+ date: 2015-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  version: '0'
148
148
  requirements: []
149
149
  rubyforge_project:
150
- rubygems_version: 2.2.2
150
+ rubygems_version: 2.4.8
151
151
  signing_key:
152
152
  specification_version: 4
153
153
  summary: luigi - a plumber