gi_cat_driver 0.2.12 → 0.3.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.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gi_cat_driver (0.2.5)
4
+ gi_cat_driver (0.3.0)
5
5
  faraday (~> 0.8.7)
6
6
  nokogiri (~> 1.5.6)
7
7
 
data/README.md CHANGED
@@ -43,6 +43,8 @@ Annotated source code documentation is available at http://nsidc.github.com/gi_c
43
43
  Rubydoc API documentation is available at http://rubydoc.info/gems/gi_cat_driver/
44
44
 
45
45
  ## Version History
46
+ * 0.3.0
47
+ * When a profile is removed all of its child accessors are also removed
46
48
  * 0.2.8
47
49
  * Removed constant variables causing errors in the console output
48
50
  * 0.2.6
@@ -52,8 +52,11 @@ module GiCatDriver
52
52
  return profile_id
53
53
  end
54
54
 
55
- # Remove a profile with the given name
55
+ # Remove a profile with the given name and
56
+ # delete each of the related accessors to clear the associated data
56
57
  def delete_profile( profile_name )
58
+ delete_all_accessors(profile_name)
59
+
57
60
  profile_id = find_profile_id( profile_name )
58
61
  response = Faraday.get do |req|
59
62
  req.url "#{@base_url}/services/conf/brokerConfigurations/#{profile_id}", { :opts => 'delete', :random => generate_random_number }
@@ -179,6 +182,16 @@ module GiCatDriver
179
182
  end
180
183
  end
181
184
 
185
+ # Remove all accessors (xml feed resources) from the given profile
186
+ def delete_all_accessors( profile_name )
187
+ profile_id = find_profile_id(profile_name)
188
+ harvesters = get_harvest_resources(profile_id)
189
+ harvesters.each do |harvester_id, harvester_title|
190
+ accessor_name = get_active_profile_accessor_name(profile_id, harvester_id)
191
+ delete_accessor(profile_name, accessor_name)
192
+ end
193
+ end
194
+
182
195
  # Publish an interface to access GI-Cat data for the given profile name
183
196
  # The interface_configuration is a hash that defines a 'profiler' and 'path'
184
197
  def publish_interface( profile_name, interface_configuration )
@@ -1,3 +1,3 @@
1
1
  module GiCatDriver
2
- VERSION = "0.2.12"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gi_cat_driver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.12
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: