easy_data 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/.gemrc ADDED
@@ -0,0 +1,8 @@
1
+ test_options:
2
+ auto_test_on_install: true
3
+ test_on_install: true
4
+ install_development_dependencies: true
5
+ test_development_dependencies: false
6
+ upload_results: false
7
+ force_install: false
8
+ force_uninstall_on_failure: false
data/.gemtest ADDED
@@ -0,0 +1 @@
1
+
@@ -10,9 +10,7 @@ class EasyDatasController < ActionController::Base
10
10
 
11
11
  def show
12
12
  begin
13
- model = (eval params[:model].to_s)
14
-
15
- conditions = parser_params(params)
13
+ model = (eval params[:model].to_s)
16
14
 
17
15
  rdf = ModelRdf.new
18
16
 
@@ -33,7 +31,7 @@ class EasyDatasController < ActionController::Base
33
31
  else
34
32
  respond_to do |format|
35
33
  format.html
36
- format.xml # render :template => "/rdf/request.xml.builder"
34
+ format.xml
37
35
  end
38
36
  end
39
37
  rescue
@@ -62,7 +60,7 @@ class EasyDatasController < ActionController::Base
62
60
  else
63
61
  respond_to do |format|
64
62
  format.html
65
- format.xml # render :template => "/rdf/request.xml.builder"
63
+ format.xml
66
64
  end
67
65
  end
68
66
  rescue
@@ -89,18 +87,6 @@ class EasyDatasController < ActionController::Base
89
87
  end
90
88
  end
91
89
 
92
- # Information about access to publicated data
93
- def access_to_data
94
- end
95
-
96
- # Generate Linked Data Graph
97
- def linked_data
98
- end
99
-
100
- # FAQ
101
- def faq
102
- end
103
-
104
90
  def custom_rdf
105
91
  @models = DataModels.load_models
106
92
  @settings ||= YAML::load(File.open("#{RAILS_ROOT}/config/easy_data/setting.yaml"))
@@ -1,3 +1,3 @@
1
1
  module EasyData
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
data/lib/routes.rb CHANGED
@@ -1,45 +1,41 @@
1
1
  require "action_controller"
2
2
 
3
3
  module EasyDataRouting
4
- def self.routes(map)
5
- map.with_options :controller => 'easy_datas' do |ed_routes|
6
- ed_routes.with_options :conditions => {:method => :get} do |ed_views|
7
- ed_views.connect 'easy_datas/custom_rdf', :action=> "custom_rdf"
8
- ed_views.connect 'easy_data', :action => "custom_rdf"
9
- ed_views.connect 'easy_datas/authenticate_user', :action => "authenticate_user"
10
- ed_views.connect 's/data_publications', :action => 'info_easy_data'
11
- ed_views.connect 'easy_datas/info_easy_data', :action => 'info_easy_data'
12
- ed_views.connect 'easy_datas/linked_data', :action => 'linked_data'
13
- ed_views.connect 'easy_datas/access_to_data', :action => 'access_to_data'
14
- ed_views.connect 'easy_datas/faq', :action => 'faq'
15
- ed_views.connect 'easy_datas/logout', :action => 'logout'
16
- ed_views.connect 'easy_datas/refresh_information', :action => "refresh_information"
4
+ def self.routes
17
5
 
18
- DataModels.load_models.each do |model|
19
- ed_views.connect "s/#{model.gsub("::","_")}/:id", :controller => "easy_datas",
20
- :action => 'show',
21
- :model => model,
22
- :format => 'xml'
23
- ed_views.connect "s/#{model.gsub("::","_").pluralize}", :controller => "easy_datas",
24
- :action => 'show_all',
25
- :model => model,
26
- :format => 'xml'
6
+ resources :easy_datas do
7
+ member do
8
+ #GET
9
+ get '/custom_rdf', :to => "easy_datas#custom_rdf"
10
+ get '/authenticate_user',:to => "easy_datas#authenticate_user"
11
+ get '/s/data_publications', :to => 'easy_datas#info_easy_data'
12
+ get '/info_easy_data', :to => 'easy_datas#info_easy_data'
13
+ get '/linked_data', :to => 'easy_datas#linked_data'
14
+ get '/access_to_data', :to => 'easy_datas#access_to_data'
15
+ get '/faq', :to => 'easy_datas#faq'
16
+ get '/logout', :to => 'easy_datas#logout'
17
+ #POST
18
+ post '/model_attributes_info', :to => "easy_datas#model_attributes_info"
19
+ post '/load_linked_data_graph', :to => "easy_datas#load_linked_data_graph"
20
+ post '/model_attributes/:model', :to => 'easy_datas#model_attributes'
21
+ post '/model_attributes_edit/:model', :to => 'easy_datas#model_attributes_edit'
22
+ post '/load_properties/:block/:attribute', :to => 'easy_datas#load_properties'
23
+ post '/login', :to => 'easy_datas#login'
24
+ post '/custom_attributes/:model', :to => 'easy_datas#custom_attributes'
25
+ post '/settings', :to => 'easy_datas#settings'
26
+ post '/custom_settings', :to => 'easy_datas#custom_settings'
27
+ post '/view_settings', :to => 'easy_datas#view_settings'
27
28
  end
29
+ end
30
+ DataModels.load_models.each do |model|
31
+ match "/s/#{model.gsub("::","_")}/:id.:format", :to => "easy_datas#show",
32
+ :about => "/s/#{model.gsub("::","_")}"
33
+ match "/s/#{model.gsub("::","_").pluralize}.:format",:to => "easy_datas#show_all",
34
+ :about => "/s/#{model.gsub("::","_").pluralize}"
35
+ end
28
36
 
29
- end
30
- ed_routes.with_options :conditions => {:method => :post} do |ed_actions|
31
- ed_actions.connect 'easy_datas/model_attributes_info', :action => "model_attributes_info"
32
- ed_actions.connect 'easy_datas/load_linked_data_graph', :action => "load_linked_data_graph"
33
- ed_actions.connect 'easy_datas/model_attributes/:model', :action => 'model_attributes'
34
- ed_actions.connect 'easy_datas/model_attributes_edit/:model', :action => 'model_attributes_edit'
35
- ed_actions.connect 'easy_datas/load_properties/:block/:attribute', :action => 'load_properties'
36
- ed_actions.connect 'easy_datas/login', :action => 'login'
37
- ed_actions.connect 'easy_datas/custom_attributes/:model', :action => 'custom_attributes'
38
- ed_actions.connect 'easy_datas/settings', :action => 'settings'
39
- ed_actions.connect 'easy_datas/custom_settings', :action => 'custom_settings'
40
- ed_actions.connect 'easy_datas/view_settings', :action => 'view_settings'
41
- end
42
- end
37
+
38
+
43
39
  end
44
40
  end
45
41
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_data
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 8
10
- version: 0.0.8
9
+ - 9
10
+ version: 0.0.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - jnillo
@@ -75,6 +75,8 @@ extensions: []
75
75
  extra_rdoc_files: []
76
76
 
77
77
  files:
78
+ - .gemrc
79
+ - .gemtest
78
80
  - .gitignore
79
81
  - .idea/EasyData.iml
80
82
  - .idea/encodings.xml