Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Plugin first version available in github

  • Loading branch information...
commit fc12aad6a4d7e40c83c6705c0baf38a6bd591996 0 parents
@JoaoCostaImag JoaoCostaImag authored
1  .idea/.name
@@ -0,0 +1 @@
+redmine_evm
3  .idea/dictionaries/imaginary.xml
@@ -0,0 +1,3 @@
+<component name="ProjectDictionaryState">
+ <dictionary name="imaginary" />
+</component>
5 .idea/encodings.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
+</project>
+
42 .idea/misc.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectInspectionProfilesVisibleTreeState">
+ <entry key="Project Default">
+ <profile-state>
+ <expanded-state>
+ <State>
+ <id />
+ </State>
+ </expanded-state>
+ <selected-state>
+ <State>
+ <id>CSS</id>
+ </State>
+ </selected-state>
+ </profile-state>
+ </entry>
+ </component>
+ <component name="ProjectResources">
+ <default-html-doctype>$APPLICATION_HOME_DIR$/lib/rubymine.jar!/resources/html5-schema/html5.rnc</default-html-doctype>
+ </component>
+ <component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-1.9.3-p194 [global]" project-jdk-type="RUBY_SDK" />
+ <component name="SvnConfiguration" maxAnnotateRevisions="500" myUseAcceleration="nothing" myAutoUpdateAfterCommit="false" cleanupOnStartRun="false">
+ <option name="USER" value="" />
+ <option name="PASSWORD" value="" />
+ <option name="mySSHConnectionTimeout" value="30000" />
+ <option name="mySSHReadTimeout" value="30000" />
+ <option name="LAST_MERGED_REVISION" />
+ <option name="MERGE_DRY_RUN" value="false" />
+ <option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
+ <option name="UPDATE_LOCK_ON_DEMAND" value="false" />
+ <option name="IGNORE_SPACES_IN_MERGE" value="false" />
+ <option name="DETECT_NESTED_COPIES" value="true" />
+ <option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
+ <option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
+ <option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
+ <option name="FORCE_UPDATE" value="false" />
+ <option name="IGNORE_EXTERNALS" value="false" />
+ <myIsUseDefaultProxy>false</myIsUseDefaultProxy>
+ </component>
+</project>
+
9 .idea/modules.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/.idea/redmine_evm.iml" filepath="$PROJECT_DIR$/.idea/redmine_evm.iml" />
+ </modules>
+ </component>
+</project>
+
24 .idea/redmine_evm.iml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="RUBY_MODULE" version="4">
+ <component name="FacetManager">
+ <facet type="RailsFacetType" name="Ruby on Rails">
+ <configuration>
+ <RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_SUPPORT_REMOVED" VALUE="false" />
+ <RAILS_FACET_CONFIG_ID NAME="RAILS_TESTS_SOURCES_PATCHED" VALUE="true" />
+ <RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_APPLICATION_ROOT" VALUE="$MODULE_DIR$" />
+ </configuration>
+ </facet>
+ </component>
+ <component name="NewModuleRootManager">
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+ <component name="RModuleSettingsStorage">
+ <LOAD_PATH number="0" />
+ <I18N_FOLDERS number="1" string0="$MODULE_DIR$/config/locales" />
+ </component>
+</module>
+
5 .idea/scopes/scope_settings.xml
@@ -0,0 +1,5 @@
+<component name="DependencyValidationManager">
+ <state>
+ <option name="SKIP_IMPORT_STATEMENTS" value="false" />
+ </state>
+</component>
7 .idea/vcs.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="VcsDirectoryMappings">
+ <mapping directory="" vcs="" />
+ </component>
+</project>
+
466 .idea/workspace.xml
@@ -0,0 +1,466 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ChangeListManager">
+ <list default="true" id="4a6ceba9-53a4-49fe-a303-ade516a8e17d" name="Default" comment="" />
+ <ignored path="redmine_evm.iws" />
+ <ignored path=".idea/workspace.xml" />
+ <option name="TRACKING_ENABLED" value="true" />
+ <option name="SHOW_DIALOG" value="false" />
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+ <option name="LAST_RESOLUTION" value="IGNORE" />
+ </component>
+ <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
+ <component name="CreatePatchCommitExecutor">
+ <option name="PATCH_PATH" value="" />
+ </component>
+ <component name="DaemonCodeAnalyzer">
+ <disable_hints />
+ </component>
+ <component name="FileEditorManager">
+ <leaf>
+ <file leaf-file-name="ratios_controller.rb" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/app/controllers/ratios_controller.rb">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="11" column="17" selection-start="163" selection-end="163" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="routes.rb" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/config/routes.rb">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="3" column="34" selection-start="103" selection-end="103" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="index.html.erb" pinned="false" current="true" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/app/views/ratios/index.html.erb">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="6" column="31" selection-start="104" selection-end="104" vertical-scroll-proportion="0.15761821">
+ <folding>
+ <marker date="1351003930000" expanded="true" signature="36:103" placeholder="..." />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ </file>
+ </leaf>
+ </component>
+ <component name="FindManager">
+ <FindUsagesManager>
+ <setting name="OPEN_NEW_TAB" value="false" />
+ </FindUsagesManager>
+ </component>
+ <component name="IdeDocumentHistory">
+ <option name="changedFiles">
+ <list>
+ <option value="$PROJECT_DIR$/config/routes.rb" />
+ <option value="$PROJECT_DIR$/init.rb" />
+ <option value="$PROJECT_DIR$/app/controllers/ratios_controller.rb" />
+ <option value="$PROJECT_DIR$/app/views/ratios/index.html.erb" />
+ </list>
+ </option>
+ </component>
+ <component name="ProjectFrameBounds">
+ <option name="x" value="-1" />
+ <option name="y" value="25" />
+ <option name="width" value="1026" />
+ <option name="height" value="744" />
+ </component>
+ <component name="ProjectLevelVcsManager" settingsEditedManually="false">
+ <OptionsSetting value="true" id="Add" />
+ <OptionsSetting value="true" id="Remove" />
+ <OptionsSetting value="true" id="Checkout" />
+ <OptionsSetting value="true" id="Update" />
+ <OptionsSetting value="true" id="Status" />
+ <OptionsSetting value="true" id="Edit" />
+ <ConfirmationsSetting value="0" id="Add" />
+ <ConfirmationsSetting value="0" id="Remove" />
+ </component>
+ <component name="ProjectReloadState">
+ <option name="STATE" value="0" />
+ </component>
+ <component name="ProjectView">
+ <navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
+ <flattenPackages />
+ <showMembers />
+ <showModules />
+ <showLibraryContents />
+ <hideEmptyPackages />
+ <abbreviatePackageNames />
+ <autoscrollToSource />
+ <autoscrollFromSource />
+ <sortByType />
+ </navigator>
+ <panes>
+ <pane id="ProjectPane">
+ <subPane>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="redmine_evm" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="External Libraries" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ExternalLibrariesNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="redmine_evm" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ </subPane>
+ </pane>
+ <pane id="Scope" />
+ <pane id="RailsProjectView" />
+ </panes>
+ </component>
+ <component name="PropertiesComponent">
+ <property name="options.splitter.main.proportions" value="0.3" />
+ <property name="WebServerToolWindowFactoryState" value="false" />
+ <property name="recentsLimit" value="5" />
+ <property name="options.lastSelected" value="preferences.externalResources" />
+ <property name="options.searchVisible" value="true" />
+ <property name="options.splitter.details.proportions" value="0.2" />
+ </component>
+ <component name="RunManager" selected="Rails.Development: redmine_evm">
+ <configuration default="true" type="RakeRunConfigurationType" factoryName="Rake">
+ <module name="" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
+ <envs />
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
+ <COVERAGE_PATTERN ENABLED="true">
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
+ </COVERAGE_PATTERN>
+ </EXTENSION>
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE="" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
+ <method />
+ </configuration>
+ <configuration default="true" type="RailsRunConfigurationType" factoryName="Rails">
+ <predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
+ <module name="" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
+ <envs />
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
+ <COVERAGE_PATTERN ENABLED="true">
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
+ </COVERAGE_PATTERN>
+ </EXTENSION>
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="development" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
+ <method />
+ </configuration>
+ <configuration default="true" type="RSpecRunConfigurationType" factoryName="RSpec">
+ <predefined_log_file id="RUBY_RSPEC" enabled="true" />
+ <module name="" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
+ <envs />
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
+ <COVERAGE_PATTERN ENABLED="true">
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
+ </COVERAGE_PATTERN>
+ </EXTENSION>
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
+ <method />
+ </configuration>
+ <configuration default="true" type="RubyRunConfigurationType" factoryName="Ruby">
+ <module name="" />
+ <RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
+ <RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="" />
+ <RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
+ <RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
+ <RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
+ <envs />
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
+ <COVERAGE_PATTERN ENABLED="true">
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
+ </COVERAGE_PATTERN>
+ </EXTENSION>
+ <RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="" />
+ <RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
+ <method />
+ </configuration>
+ <configuration default="true" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest">
+ <predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
+ <module name="" />
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
+ <envs />
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
+ <COVERAGE_PATTERN ENABLED="true">
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
+ </COVERAGE_PATTERN>
+ </EXTENSION>
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
+ <method />
+ </configuration>
+ <configuration default="false" name="test" type="RakeRunConfigurationType" factoryName="Rake">
+ <module name="redmine_evm" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
+ <envs>
+ <env name="RAILS_ENV" value="test" />
+ </envs>
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
+ <COVERAGE_PATTERN ENABLED="true">
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
+ </COVERAGE_PATTERN>
+ </EXTENSION>
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="test" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":test_unit " />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
+ <method />
+ </configuration>
+ <configuration default="false" name="spec" type="RakeRunConfigurationType" factoryName="Rake">
+ <module name="redmine_evm" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
+ <envs />
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
+ <COVERAGE_PATTERN ENABLED="true">
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
+ </COVERAGE_PATTERN>
+ </EXTENSION>
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="spec" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":rspec " />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
+ <method />
+ </configuration>
+ <configuration default="false" name="Production: redmine_evm" type="RailsRunConfigurationType" factoryName="Rails">
+ <predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
+ <module name="redmine_evm" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
+ <envs />
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
+ <COVERAGE_PATTERN ENABLED="true">
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
+ </COVERAGE_PATTERN>
+ </EXTENSION>
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="production" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
+ <method />
+ </configuration>
+ <configuration default="false" name="Development: redmine_evm" type="RailsRunConfigurationType" factoryName="Rails">
+ <predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
+ <module name="redmine_evm" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
+ <envs />
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
+ <COVERAGE_PATTERN ENABLED="true">
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
+ </COVERAGE_PATTERN>
+ </EXTENSION>
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="development" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
+ <method />
+ </configuration>
+ <list size="4">
+ <item index="0" class="java.lang.String" itemvalue="Rake.test" />
+ <item index="1" class="java.lang.String" itemvalue="Rake.spec" />
+ <item index="2" class="java.lang.String" itemvalue="Rails.Production: redmine_evm" />
+ <item index="3" class="java.lang.String" itemvalue="Rails.Development: redmine_evm" />
+ </list>
+ </component>
+ <component name="ShelveChangesManager" show_recycled="false" />
+ <component name="TaskManager">
+ <task active="true" id="Default" summary="Default task">
+ <created>1351000798450</created>
+ <updated>1351000798450</updated>
+ </task>
+ <servers />
+ </component>
+ <component name="ToolWindowManager">
+ <frame x="-1" y="25" width="1026" height="744" extended-state="6" />
+ <editor active="false" />
+ <layout>
+ <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
+ <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
+ <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
+ <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
+ <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24948876" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+ <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
+ <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
+ <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
+ <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+ <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+ <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
+ <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
+ <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
+ </layout>
+ </component>
+ <component name="VcsContentAnnotationSettings">
+ <option name="myLimit" value="2678400000" />
+ </component>
+ <component name="VcsManagerConfiguration">
+ <option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
+ <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
+ <option name="CHECK_NEW_TODO" value="true" />
+ <option name="myTodoPanelSettings">
+ <value>
+ <are-packages-shown value="false" />
+ <are-modules-shown value="false" />
+ <flatten-packages value="false" />
+ <is-autoscroll-to-source value="false" />
+ </value>
+ </option>
+ <option name="PERFORM_UPDATE_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_COMMIT_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_ROLLBACK_IN_BACKGROUND" value="false" />
+ <option name="CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND" value="false" />
+ <option name="CHANGED_ON_SERVER_INTERVAL" value="60" />
+ <option name="SHOW_ONLY_CHANGED_IN_SELECTION_DIFF" value="true" />
+ <option name="CHECK_COMMIT_MESSAGE_SPELLING" value="true" />
+ <option name="DEFAULT_PATCH_EXTENSION" value="patch" />
+ <option name="SHORT_DIFF_HORISONTALLY" value="true" />
+ <option name="SHORT_DIFF_EXTRA_LINES" value="2" />
+ <option name="SOFT_WRAPS_IN_SHORT_DIFF" value="true" />
+ <option name="INCLUDE_TEXT_INTO_PATCH" value="false" />
+ <option name="INCLUDE_TEXT_INTO_SHELF" value="false" />
+ <option name="SHOW_FILE_HISTORY_DETAILS" value="true" />
+ <option name="SHOW_VCS_ERROR_NOTIFICATIONS" value="true" />
+ <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
+ <option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="false" />
+ <option name="LAST_COMMIT_MESSAGE" />
+ <option name="MAKE_NEW_CHANGELIST_ACTIVE" value="false" />
+ <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
+ <option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
+ <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
+ <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
+ <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
+ <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
+ <option name="ACTIVE_VCS_NAME" />
+ <option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
+ <option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
+ <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
+ <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
+ </component>
+ <component name="XDebuggerManager">
+ <breakpoint-manager />
+ </component>
+ <component name="editorHistoryManager">
+ <entry file="file://$PROJECT_DIR$/init.rb">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="10" column="125" selection-start="453" selection-end="453" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/config/routes.rb">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="3" column="34" selection-start="103" selection-end="103" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/controllers/ratios_controller.rb">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="11" column="17" selection-start="163" selection-end="163" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/views/ratios/index.html.erb">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="6" column="31" selection-start="104" selection-end="104" vertical-scroll-proportion="0.15761821">
+ <folding>
+ <marker date="1351003930000" expanded="true" signature="36:103" placeholder="..." />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ </component>
+</project>
+
18 LICENSE
@@ -0,0 +1,18 @@
+Redmine plugin redmine_evm
+Copyright (c) 2012 ImaginaryCloud, imaginarycloud.com.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
+ associated documentation files (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies
+or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
50 README.rdoc
@@ -0,0 +1,50 @@
+= redmine_evm
+
+V0.9.0 (05-Dec-2012)
+
+==About
+
+ This plugin generates line graphical indicators, per Project and open Versions,
+ used in EVM (Earned-Value Management).
+ It shows actual cost (hours reported in log time), planned value
+ (estimated hours indicated in new issue),
+ and earned value distributed in weeks / years.
+ It also shows cpi and spi indicators.
+ Tested on redmine 2.1.3
+
+==Plugin details
+
+ While within a project, this plugin will collect information on hours planned and spent on a
+ project and it's open versions, and present them along with a time scale of weeks per year.
+ It's advisable to fill information on project, version or issues creation about their start date,
+ end date and estimated hours.
+ If such information is not provided it will assume as end date the most likely to be it,
+ such as today's date, for example.
+ Issue estimated hours are distributed equally through issue duration in working days.
+ Hours are presented in a cummulated fashion over time, shown in linear format which serves as a visual
+ indicator to performance obtained.
+ Also included are CPI and SPI indicators.
+ Permissions are
+ Charts are provided by Google Charts. Live connection to internet is required to generate charts.
+
+==Installation:
+
+ 1) Downloading tarball.
+ 2) Extract tarball to {redmine_root}/plugins/redmine_evm/
+
+
+==Keywords:
+
+ EVM, CPI, SPI, Earned Value Management, Redmine, Plugin
+
+==Todo:
+ Baselines;
+ Forecast;
+ Cost to Resources;
+ YTD Values, not constant to End Date;
+
+==License:
+ Copyright © 2012 ImaginaryCloud, imaginarycloud.com. This plugin is licensed under the MIT license.
+
+
+
17 app/controllers/ratios_controller.rb
@@ -0,0 +1,17 @@
+class RatiosController < ApplicationController
+ unloadable
+ include IndicatorsLogic
+
+ def index
+
+ @project = Project.find(params[:id])
+ @proj_or_vers_data = IndicatorsLogic::retrive_data(@project)
+ @proj_or_vers_indicators = IndicatorsLogic::calc_indicators(@project, @proj_or_vers_data[0], @proj_or_vers_data[1])
+
+ end
+
+
+end
+
+
+
5 app/helpers/ratios_helper.rb
@@ -0,0 +1,5 @@
+module RatiosHelper
+
+
+
+end
67 app/views/ratios/_bottom_js.html.erb
@@ -0,0 +1,67 @@
+
+<div id="chart <%= name %>" class="goocharts"></div>
+<div id="gauge_cpi <%= name %>" class="googauges"></div>
+<div id="gauge_spi <%= name %>" class="googauges"></div>
+<div style="clear:both;"></div>
+<script type="text/javascript">
+ drawChart();
+ drawCpi();
+ drawSpi();
+
+ function drawChart() {
+ var data = new google.visualization.arrayToDataTable(<%=raw @proj_or_vers_indicators[0] %>);
+
+ var options = {
+ title: 'EVM Indicators - <%= name %>',
+ series: {0:{color: 'red'},
+ 1:{color: 'blue'},
+ 2:{color: 'green'}},
+ vAxis: {title: 'Hours', titleTextStyle: {color: 'red'}}
+ };
+
+ var chart = new google.visualization.LineChart(document.getElementById("chart <%= name %>"));
+ chart.draw(data, options);
+ }
+
+ function drawCpi() {
+ // Create and populate the data table.
+ var data_gauge = new google.visualization.arrayToDataTable([
+ ['Label', 'Value'],
+ ['CPI', <%=raw @proj_or_vers_indicators[1].round(3) %>]
+ ]);
+
+
+ var options_g = {
+ redFrom: 0, redTo: 0.85,
+ yellowFrom:0.85, yellowTo: 1,
+ greenFrom:1, greenTo:2,
+ minorTicks:5,
+ min:0, max:2
+ };
+
+ // Create and draw the visualization.
+ var gauge= new google.visualization.Gauge(document.getElementById("gauge_cpi <%= name %>"));
+ gauge.draw(data_gauge, options_g);
+ }
+
+ function drawSpi() {
+ // Create and populate the data table.
+ var data_gauges = new google.visualization.arrayToDataTable([
+ ['Label', 'Value'],
+ ['SPI', <%=raw @proj_or_vers_indicators[2].round(3) %>]
+ ]);
+
+
+ var options_gs = {
+ redFrom: 0, redTo: 0.85,
+ yellowFrom:0.85, yellowTo: 1,
+ greenFrom:1, greenTo:2,
+ minorTicks:5,
+ min:0, max:2
+ };
+
+ // Create and draw the visualization.
+ var gauge= new google.visualization.Gauge(document.getElementById("gauge_spi <%= name %>"));
+ gauge.draw(data_gauges, options_gs);
+ }
+</script>
67 app/views/ratios/_bottom_js.html.erb~
@@ -0,0 +1,67 @@
+
+<div id="chart <%= name %>" class="goocharts"></div>
+<div id="gauge_cpi <%= name %>" class="googauges"></div>
+<div id="gauge_spi <%= name %>" class="googauges"></div>
+<div style="clear:both;"></div>
+<script type="text/javascript">
+ drawChart();
+ drawCpi();
+ drawSpi();
+
+ function drawChart() {
+ var data = new google.visualization.arrayToDataTable(<%=raw @proj_or_vers_indicators[0] %>);
+
+ var options = {
+ title: 'Indicadores EVM - <%= name %>',
+ series: {0:{color: 'red'},
+ 1:{color: 'blue'},
+ 2:{color: 'green'}},
+ vAxis: {title: 'Hours', titleTextStyle: {color: 'red'}}
+ };
+
+ var chart = new google.visualization.LineChart(document.getElementById("chart <%= name %>"));
+ chart.draw(data, options);
+ }
+
+ function drawCpi() {
+ // Create and populate the data table.
+ var data_gauge = new google.visualization.arrayToDataTable([
+ ['Label', 'Value'],
+ ['CPI', <%=raw @proj_or_vers_indicators[1].round(3) %>]
+ ]);
+
+
+ var options_g = {
+ redFrom: 0, redTo: 0.85,
+ yellowFrom:0.85, yellowTo: 1,
+ greenFrom:1, greenTo:2,
+ minorTicks:5,
+ min:0, max:2
+ };
+
+ // Create and draw the visualization.
+ var gauge= new google.visualization.Gauge(document.getElementById("gauge_cpi <%= name %>"));
+ gauge.draw(data_gauge, options_g);
+ }
+
+ function drawSpi() {
+ // Create and populate the data table.
+ var data_gauges = new google.visualization.arrayToDataTable([
+ ['Label', 'Value'],
+ ['SPI', <%=raw @proj_or_vers_indicators[2].round(3) %>]
+ ]);
+
+
+ var options_gs = {
+ redFrom: 0, redTo: 0.85,
+ yellowFrom:0.85, yellowTo: 1,
+ greenFrom:1, greenTo:2,
+ minorTicks:5,
+ min:0, max:2
+ };
+
+ // Create and draw the visualization.
+ var gauge= new google.visualization.Gauge(document.getElementById("gauge_spi <%= name %>"));
+ gauge.draw(data_gauges, options_gs);
+ }
+</script>
6 app/views/ratios/_head_js.html.erb
@@ -0,0 +1,6 @@
+<script type="text/javascript" src="https://www.google.com/jsapi"></script>
+<script type="text/javascript">
+ google.load("visualization", "1", {packages:["corechart"]});
+ google.load('visualization', '1', {packages: ['gauge']});
+</script>
+
20 app/views/ratios/index.html.erb
@@ -0,0 +1,20 @@
+<!---Load header javascript --->
+<%= render "ratios/head_js" %>
+
+<!--- Load custom css --->
+<% content_for :header_tags do %>
+ <%= stylesheet_link_tag 'ratios', :plugin => 'redmine_evm' %>
+<% end %>
+
+<!--- Load javascript functions --->
+<%= render :partial=>"ratios/bottom_js", :locals=>{:name=>@project.name}%>
+
+<!--- Iterate through versions and render indicators --->
+<% @project.versions.where(:status=>"open").each do |my_version|%>
+<%= render "ratios/head_js" %>
+<% proj_or_vers_data=IndicatorsLogic::retrive_data(my_version) %>
+<% @proj_or_vers_indicators=IndicatorsLogic::calc_indicators(my_version, proj_or_vers_data[0], proj_or_vers_data[1]) %>
+<%= render :partial=>"ratios/bottom_js", :locals=>{:name=>my_version.name}%>
+<% end %>
+
+
13 assets/stylesheets/ratios.css
@@ -0,0 +1,13 @@
+.googauges{
+ width:150px;
+ height:200px;
+ margin-top:150px;
+ margin-left:25px;
+ float:left;
+}
+
+.goocharts{
+ width:60%;
+ height:400px;
+ float:left;
+}
3  config/locales/en.yml
@@ -0,0 +1,3 @@
+# English strings go here for Rails i18n
+en:
+ my_label: "My label"
4 config/routes.rb
@@ -0,0 +1,4 @@
+# Plugin's routes
+# See: http://guides.rubyonrails.org/routing.html
+
+get 'ratios', :to => 'ratios#index'
14 init.rb
@@ -0,0 +1,14 @@
+Redmine::Plugin.register :redmine_evm do
+
+ name 'Redmine Evm plugin'
+ author 'ImaginaryCloud'
+ description 'Graphical indicators for EV Management'
+ version '0.9.0'
+ url 'http://imaginarycloud.com'
+ author_url 'mailto:jcosta@imaginarycloud.com'
+
+ permission :ratios, { :ratios => [:index] }, :public => true
+ menu :project_menu, :ratios, { :controller => 'ratios', :action => 'index' }, :caption => 'EVM', :after => :files
+
+
+end
89 lib/indicators_logic.rb
@@ -0,0 +1,89 @@
+module IndicatorsLogic
+
+ def self.retrive_data(project_or_version)
+ if project_or_version.instance_of? Version
+ my_project = project_or_version.project
+ my_version = project_or_version
+
+ ary_reported_time_week_year = my_project.time_entries.where(:issue_id=>Issue.where(:fixed_version_id=>my_version.id)).sum(:hours, :group =>[:tweek, :tyear], :order=> [:tyear, :tweek])
+ ary_all_issues = my_version.fixed_issues
+
+ else
+ my_project = project_or_version
+ ary_reported_time_week_year = my_project.time_entries.sum(:hours, :group =>[:tweek, :tyear], :order=> [:tyear, :tweek])
+ ary_all_issues = my_project.issues
+ end
+ return [ary_reported_time_week_year, ary_all_issues]
+ end
+
+
+ def self.calc_indicators(my_project_or_version, ary_reported_time_week_year, ary_all_issues)
+
+ check_end_date = my_project_or_version.due_date || Time.now.to_date
+ check_ary_reported_time_week_year = ary_reported_time_week_year.empty? ? Time.now.to_date : Date.ordinal(ary_reported_time_week_year.keys.last[1], ary_reported_time_week_year.keys.last[0]*7-3)
+ check_ary_all_issues = ary_all_issues.empty? ? Time.now.to_date : ary_all_issues.maximum(:start_date)
+ my_project_or_version_end_date = [check_end_date,check_ary_reported_time_week_year, check_ary_all_issues].max
+
+ ary_weeks_years = []
+
+ real_start_date = my_project_or_version.start_date.nil? ? (Time.now.to_date - 1.day): my_project_or_version.start_date.beginning_of_week
+ while real_start_date < my_project_or_version_end_date + 1.week
+ ary_weeks_years << [real_start_date.cweek, real_start_date.year]
+ real_start_date += 1.week
+ end
+
+ hash_weeks_years = {}
+ ary_weeks_years.each{|e| hash_weeks_years[e] = [0,0,0]}
+ @done_ratio = 0
+
+ ary_all_issues.each do |issue|
+
+ start_issue_date = issue.start_date? ? issue.start_date : my_project_or_version.start_date
+ end_issue_date = issue.due_date? ? issue.due_date : my_project_or_version_end_date
+ estimated_time = issue.estimated_hours? ? issue.estimated_hours : 0
+ @done_ratio = (issue.done_ratio / 100)
+ ary_dates = (start_issue_date..end_issue_date).to_a
+ ary_dates.delete_if{|x| x.saturday? || x.sunday?}
+
+ if ary_dates.any? && estimated_time != 0
+ hoursPerDay = estimated_time / ary_dates.size
+
+ ary_dates.each do |day|
+ week = day.cweek
+ year = day.year
+ hash_weeks_years[[week,year]][1] += hoursPerDay
+ hash_weeks_years[[week,year]][2] += hoursPerDay * @done_ratio
+ end
+
+ end
+
+ end
+
+ @ary_data_week_years = [Array['week', 'ActualCost', 'PlannedCost', 'EarnedValue']]
+ sum_real = 0
+ sum_planned = 0
+ sum_earned = 0
+
+ hash_weeks_years.each do |k,v|
+ sum_real += ary_reported_time_week_year.has_key?(k)? ary_reported_time_week_year[k] : 0
+ v[0] = sum_real
+ sum_planned += v[1]
+ v[1] = sum_planned
+ sum_earned += v[2]
+ v[2] = sum_earned
+ @ary_data_week_years.push(Array[k[0].to_s + "/" + k[1].to_s, v[0].round(2), v[1].round(2), v[2].round(2)])
+ end
+
+ @cpi = hash_weeks_years.values.last[0].zero? ? 0 : hash_weeks_years.values.last[2]/hash_weeks_years.values.last[0]
+ @spi = hash_weeks_years.values.last[1].zero? ? 0 : hash_weeks_years.values.last[2]/hash_weeks_years.values.last[1]
+ return [@ary_data_week_years, @cpi, @spi]
+
+ end
+
+
+
+ def self.included(base)
+ base.send :helper_method, :calc_indicators, :retrive_data if base.respond_to? :helper_method
+ end
+
+end
8 test/functional/ratios_controller_test.rb
@@ -0,0 +1,8 @@
+require File.expand_path('../../test_helper', __FILE__)
+
+class RatiosControllerTest < ActionController::TestCase
+ # Replace this with your real tests.
+ def test_truth
+ assert true
+ end
+end
2  test/test_helper.rb
@@ -0,0 +1,2 @@
+# Load the Redmine helper
+require File.expand_path(File.dirname(__FILE__) + '/../../../test/test_helper')
Please sign in to comment.
Something went wrong with that request. Please try again.