Skip to content

Commit

Permalink
Merge pull request #10 from relf/detach-wop
Browse files Browse the repository at this point in the history
remove wop submodule
  • Loading branch information
relf committed Oct 20, 2019
2 parents 592260f + 159e252 commit 9616783
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "app/javascript/XDSMjs"]
path = app/javascript/XDSMjs
url = https://github.com/OneraHub/XDSMjs.git
[submodule "wop"]
path = wop
url = https://github.com/OneraHub/WhatsOpt-CLI.git
14 changes: 3 additions & 11 deletions app/controllers/api/v1/versionings_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
class Api::V1::VersioningsController < Api::ApiController
before_action :set_versions

WOP_RECOMMENDED_VERSION = "1.3.4"

def show
authorize :info
json_response(@version)
Expand All @@ -13,22 +15,12 @@ def set_versions
@version = {}
@version[:api] = "v1"
@version[:whatsopt] = whatsopt_version
@version[:wop] = wop_version
@version[:wop] = WOP_RECOMMENDED_VERSION
end

def whatsopt_version
filepath = File.join(Rails.root, "VERSION")
File.read(filepath).chomp
end

def wop_version
filepath = File.join(Rails.root, "wop", "whatsopt", "__init__.py")
File.open(filepath).each do |line|
line.chomp!
if line =~ /^__version__\s+=\s+"(.*)"$/
return $1
end
end
nil
end
end
1 change: 0 additions & 1 deletion wop
Submodule wop deleted from 7a681b

0 comments on commit 9616783

Please sign in to comment.