petasos 0.3.0 → 0.3.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/petasos/location.rb +15 -7
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb6d3349efb1d5df1e59fb199b7ee742462e25ba5b0637b3d96ae837bfddbe6a
4
- data.tar.gz: 055bbda229afefba11e1bdc79ce3d0b32cdce8fbfb9d62d6a2ba2f7663d0608a
3
+ metadata.gz: 45cc6ffc29777b7fb1148c81b873fb5deb7eb52bc452a4e8d709f192bea1f62b
4
+ data.tar.gz: 320bcf6171021b4c3f3f62ea9c8000e42c535af170acf96204af58aea6f3fc22
5
5
  SHA512:
6
- metadata.gz: 9b683fe0a0cecf5685fbfaf459335b97bea7e69a34207ea90967235a415facdb996c8e0614d71417ce9dfc632df7b6a2e9121a43ad339cf83506e7094a014f5a
7
- data.tar.gz: 8d73c62519cc0b98c566e8b27d51be01c3ca071488f21be3999a0ba407be4e212bf252af5c8e974b89dedcca6ed28f8528506c0d85c3d376d106874ef25c7614
6
+ metadata.gz: c896d71c01d7b60a6225660d528587f02026b6bf72e914b39bc1bacf623922e8dc5045f95b4473eb1fb4ac0e21897f1776a4e9e09942f2d17f2f3ad6b76ff884
7
+ data.tar.gz: 2583ee6f496c91ac49016071b41a89911dcdbe76a7fae07a024657bcade97fd238795c8b97be31c13f38d7196fa4c1e644e418408ca92b64441f4d1b55b31edf
@@ -21,10 +21,11 @@ class Petasos::Location
21
21
  completed_files = YAML.load_file(completed_export_file_path)
22
22
 
23
23
  process_lifecycle_hooks("after_export", pool, completed_files)
24
+
25
+ `mkdir -p logs`
26
+ `mv #{export_file_path} logs/`
27
+ `mv #{completed_export_file_path} logs/`
24
28
  end
25
- `mkdir -p logs`
26
- `mv #{export_file_path} logs/`
27
- `mv #{completed_export_file_path} logs/`
28
29
  end
29
30
 
30
31
  # get all filenames in this location that belong to this pool
@@ -46,7 +47,8 @@ class Petasos::Location
46
47
 
47
48
  # update list of seen files
48
49
  # unless the location opts out
49
- unless config["disable_seen"]
50
+ # or the pool opts out
51
+ unless config["disable_seen"] or pool["disable_seen"]
50
52
  update_seen_pool_files(pool, seen_pool_files + new_files)
51
53
  end
52
54
  end
@@ -121,7 +123,11 @@ class Petasos::Location
121
123
  end
122
124
 
123
125
  def read_seen_pool_files(pool)
124
- YAML.load_file(File.join(Dir.pwd, "seen_#{config["name"]}_#{pool["name"]}.yaml"))
126
+ unless config["disable_seen"] or pool["disable_seen"]
127
+ YAML.load_file(File.join(Dir.pwd, "seen_#{config["name"]}_#{pool["name"]}.yaml"))
128
+ else
129
+ []
130
+ end
125
131
  end
126
132
 
127
133
  def update_seen_pool_files(pool, file_paths)
@@ -131,8 +137,10 @@ class Petasos::Location
131
137
 
132
138
  def initialize_all_seen_pool_files
133
139
  pools.each do |pool|
134
- yaml_path = "seen_#{config["name"]}_#{pool["name"]}.yaml"
135
- write_yaml(yaml_path, []) unless File.file?(yaml_path)
140
+ unless config["disable_seen"] or pool["disable_seen"]
141
+ yaml_path = "seen_#{config["name"]}_#{pool["name"]}.yaml"
142
+ write_yaml(yaml_path, []) unless File.file?(yaml_path)
143
+ end
136
144
  end
137
145
  end
138
146
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: petasos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Myers